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",
|
"some",
|
||||||
"methods"
|
"methods"
|
||||||
],
|
],
|
||||||
"scope": [
|
"scope": "email phone",
|
||||||
"email",
|
|
||||||
"phone"
|
|
||||||
],
|
|
||||||
"client_id": "777",
|
"client_id": "777",
|
||||||
"exp": 12345,
|
"exp": 12345,
|
||||||
"iat": 12000,
|
"iat": 12000,
|
||||||
|
|
|
@ -97,7 +97,7 @@ func (c *TokenClaims) SetSignatureAlgorithm(algorithm jose.SignatureAlgorithm) {
|
||||||
|
|
||||||
type AccessTokenClaims struct {
|
type AccessTokenClaims struct {
|
||||||
TokenClaims
|
TokenClaims
|
||||||
Scopes []string `json:"scope,omitempty"`
|
Scopes SpaceDelimitedArray `json:"scope,omitempty"`
|
||||||
Claims map[string]any `json:"-"`
|
Claims map[string]any `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue