fix: parse max_age and prompt correctly (and change scope type) (#105)
* fix: parse max_age and prompt correctly (and change scope type) * remove unnecessary omitempty
This commit is contained in:
parent
0591a0d1ef
commit
400f5c4de4
16 changed files with 98 additions and 85 deletions
|
@ -17,7 +17,7 @@ type RefreshTokenRequest interface {
|
|||
GetClientID() string
|
||||
GetScopes() []string
|
||||
GetSubject() string
|
||||
SetCurrentScopes(scopes oidc.Scopes)
|
||||
SetCurrentScopes(scopes []string)
|
||||
}
|
||||
|
||||
//RefreshTokenExchange handles the OAuth 2.0 refresh_token grant, including
|
||||
|
@ -72,7 +72,7 @@ func ValidateRefreshTokenRequest(ctx context.Context, tokenReq *oidc.RefreshToke
|
|||
//ValidateRefreshTokenScopes validates that the requested scope is a subset of the original auth request scope
|
||||
//it will set the requested scopes as current scopes onto RefreshTokenRequest
|
||||
//if empty the original scopes will be used
|
||||
func ValidateRefreshTokenScopes(requestedScopes oidc.Scopes, authRequest RefreshTokenRequest) error {
|
||||
func ValidateRefreshTokenScopes(requestedScopes []string, authRequest RefreshTokenRequest) error {
|
||||
if len(requestedScopes) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue