-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
package claims | ||
|
||
import jwt "github.com/dgrijalva/jwt-go" | ||
import ( | ||
jwt "github.com/dgrijalva/jwt-go" | ||
) | ||
|
||
// Claims auth claims | ||
type Claims struct { | ||
Provider string `json:"provider,omitempty"` | ||
UserID string `json:"userid,omitempty"` | ||
jwt.StandardClaims | ||
} | ||
|
||
// ToClaims implement ClaimerInterface | ||
func (claims *Claims) ToClaims() *Claims { | ||
return claims | ||
} | ||
|
||
// ClaimerInterface claimer interface | ||
type ClaimerInterface interface { | ||
ToClaims() *Claims | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters