improve userinfo token handling
This commit is contained in:
parent
8be8306511
commit
d89470a33f
2 changed files with 28 additions and 10 deletions
|
@ -24,6 +24,7 @@ type Tokens struct {
|
|||
|
||||
type AccessTokenClaims interface {
|
||||
Claims
|
||||
GetSubject() string
|
||||
GetTokenID() string
|
||||
SetPrivateClaims(map[string]interface{})
|
||||
}
|
||||
|
@ -128,6 +129,11 @@ func (a *accessTokenClaims) SetSignatureAlgorithm(algorithm jose.SignatureAlgori
|
|||
a.signatureAlg = algorithm
|
||||
}
|
||||
|
||||
//GetSubject implements the AccessTokenClaims interface
|
||||
func (a *accessTokenClaims) GetSubject() string {
|
||||
return a.Subject
|
||||
}
|
||||
|
||||
//GetTokenID implements the AccessTokenClaims interface
|
||||
func (a *accessTokenClaims) GetTokenID() string {
|
||||
return a.JWTID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue