@ -63,7 +64,8 @@ public final class InMemoryOAuth2AuthorizationService implements OAuth2Authoriza
@@ -63,7 +64,8 @@ public final class InMemoryOAuth2AuthorizationService implements OAuth2Authoriza
@ -152,7 +152,7 @@ public class OAuth2Authorization implements Serializable {
@@ -152,7 +152,7 @@ public class OAuth2Authorization implements Serializable {
Assert.notNull(authorization,"authorization cannot be null");
@ -102,11 +104,15 @@ public class OAuth2AuthorizationCodeAuthenticationProvider implements Authentica
@@ -102,11 +104,15 @@ public class OAuth2AuthorizationCodeAuthenticationProvider implements Authentica
@ -115,6 +121,12 @@ public class OAuth2AuthorizationCodeAuthenticationProvider implements Authentica
@@ -115,6 +121,12 @@ public class OAuth2AuthorizationCodeAuthenticationProvider implements Authentica
@ -142,9 +154,14 @@ public class OAuth2AuthorizationCodeAuthenticationProvider implements Authentica
@@ -142,9 +154,14 @@ public class OAuth2AuthorizationCodeAuthenticationProvider implements Authentica
@ -184,9 +188,12 @@ public class OAuth2AuthorizationEndpointFilter extends OncePerRequestFilter {
@@ -184,9 +188,12 @@ public class OAuth2AuthorizationEndpointFilter extends OncePerRequestFilter {
@ -200,7 +207,7 @@ public class OAuth2AuthorizationEndpointFilter extends OncePerRequestFilter {
@@ -200,7 +207,7 @@ public class OAuth2AuthorizationEndpointFilter extends OncePerRequestFilter {
// The authorization code is bound to the client identifier and redirection URI.
@ -232,18 +239,21 @@ public class OAuth2AuthorizationEndpointFilter extends OncePerRequestFilter {
@@ -232,18 +239,21 @@ public class OAuth2AuthorizationEndpointFilter extends OncePerRequestFilter {
return;
}
Stringcode=this.codeGenerator.generateKey();
InstantissuedAt=Instant.now();
InstantexpiresAt=issuedAt.plus(5,ChronoUnit.MINUTES);// TODO Allow configuration for authorization code time-to-live
@ -389,11 +399,11 @@ public class OAuth2AuthorizationEndpointFilter extends OncePerRequestFilter {
@@ -389,11 +399,11 @@ public class OAuth2AuthorizationEndpointFilter extends OncePerRequestFilter {
@ -114,12 +117,12 @@ public class InMemoryOAuth2AuthorizationServiceTests {
@@ -114,12 +117,12 @@ public class InMemoryOAuth2AuthorizationServiceTests {
@ -153,6 +155,12 @@ public class OAuth2AuthorizationCodeAuthenticationProviderTests {
@@ -153,6 +155,12 @@ public class OAuth2AuthorizationCodeAuthenticationProviderTests {
@ -173,6 +181,30 @@ public class OAuth2AuthorizationCodeAuthenticationProviderTests {
@@ -173,6 +181,30 @@ public class OAuth2AuthorizationCodeAuthenticationProviderTests {
@ -203,8 +235,9 @@ public class OAuth2AuthorizationCodeAuthenticationProviderTests {
@@ -203,8 +235,9 @@ public class OAuth2AuthorizationCodeAuthenticationProviderTests {