mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-24 02:29:05 +02:00
feat: make oauth access tokens RFC 9068 compliant
This commit is contained in:
@@ -39,6 +39,7 @@ func isReservedClaim(key string) bool {
|
||||
"acr",
|
||||
"amr",
|
||||
"azp",
|
||||
"client_id",
|
||||
"nbf",
|
||||
"jti":
|
||||
return true
|
||||
|
||||
@@ -864,7 +864,7 @@ func (s *TestService) SignAccessToken(ctx context.Context, userID, clientID stri
|
||||
keyGetter := func(context.Context) (interface{}, error) {
|
||||
return oidc.SigningKeyFromSigner(s.jwtService)
|
||||
}
|
||||
strategy := compose.NewOAuth2JWTStrategy(keyGetter, coreStrategy, fositeConfig)
|
||||
strategy := oidc.NewAccessTokenStrategy(compose.NewOAuth2RFC9068JWTStrategy(keyGetter, coreStrategy, fositeConfig), common.EnvConfig.AppURL)
|
||||
|
||||
expiresAt := time.Now().UTC().Add(AccessTokenDuration)
|
||||
if expired {
|
||||
|
||||
Reference in New Issue
Block a user