Polish gh-786
This commit is contained in:
@@ -564,10 +564,8 @@ public final class OAuth2AuthorizationCodeRequestAuthenticationProvider implemen
|
||||
!OAuth2ParameterNames.CODE.equals(context.getTokenType().getValue())) {
|
||||
return null;
|
||||
}
|
||||
RegisteredClient registeredClient = context.getRegisteredClient();
|
||||
|
||||
Instant issuedAt = Instant.now();
|
||||
Instant expiresAt = issuedAt.plus(registeredClient.getTokenSettings().getAuthorizationCodeTimeToLive());
|
||||
Instant expiresAt = issuedAt.plus(context.getRegisteredClient().getTokenSettings().getAuthorizationCodeTimeToLive());
|
||||
return new OAuth2AuthorizationCode(this.authorizationCodeGenerator.generateKey(), issuedAt, expiresAt);
|
||||
}
|
||||
|
||||
|
||||
@@ -129,8 +129,8 @@ public final class TokenSettings extends AbstractSettings {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the time-to-live for an access token. Must be greater than {@code Duration.ZERO}.
|
||||
* A maximum authorization code lifetime of 10 minutes is RECOMMENDED
|
||||
* Set the time-to-live for an authorization code. Must be greater than {@code Duration.ZERO}.
|
||||
* A maximum authorization code lifetime of 10 minutes is RECOMMENDED.
|
||||
*
|
||||
* @param authorizationCodeTimeToLive the time-to-live for an authorization code
|
||||
* @return the {@link Builder} for further configuration
|
||||
|
||||
Reference in New Issue
Block a user