fix: unmarshalling of scopes in access token (#327)
The Scopes field in accessTokenClaims should be a SpaceDelimitedArray, in order to allow for correct unmarshalling. Fixes #318 * adjust test data
This commit is contained in:
parent
0f3d4f4828
commit
c6820ba88a
2 changed files with 3 additions and 6 deletions
|
@ -13,10 +13,7 @@
|
|||
"some",
|
||||
"methods"
|
||||
],
|
||||
"scope": [
|
||||
"email",
|
||||
"phone"
|
||||
],
|
||||
"scope": "email phone",
|
||||
"client_id": "777",
|
||||
"exp": 12345,
|
||||
"iat": 12000,
|
||||
|
|
|
@ -97,7 +97,7 @@ func (c *TokenClaims) SetSignatureAlgorithm(algorithm jose.SignatureAlgorithm) {
|
|||
|
||||
type AccessTokenClaims struct {
|
||||
TokenClaims
|
||||
Scopes []string `json:"scope,omitempty"`
|
||||
Scopes SpaceDelimitedArray `json:"scope,omitempty"`
|
||||
Claims map[string]any `json:"-"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue