diff --git a/oauth2-authorization-server/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/authorization/OAuth2AuthorizationServerConfigurer.java b/oauth2-authorization-server/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/authorization/OAuth2AuthorizationServerConfigurer.java index b833cf06..2d9f70b7 100644 --- a/oauth2-authorization-server/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/authorization/OAuth2AuthorizationServerConfigurer.java +++ b/oauth2-authorization-server/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/authorization/OAuth2AuthorizationServerConfigurer.java @@ -158,7 +158,7 @@ public final class OAuth2AuthorizationServerConfigurer *
  • {@code client_id} - the client identifier
  • - *
  • {@code scope} - the space separated list of scopes present in the authorization request
  • + *
  • {@code scope} - a space-delimited list of scopes present in the authorization request
  • *
  • {@code state} - a CSRF protection token
  • * * @@ -172,11 +172,9 @@ public final class OAuth2AuthorizationServerConfigurerIt must include the received {@code state} as an HTTP parameter *
  • It must include the list of {@code scope}s the {@code Resource Owner} * consented to as an HTTP parameter
  • - *
  • It must include the {@code consent_action} parameter, with a value either - * {@code approve} or {@code cancel} as an HTTP parameter
  • * * - * @param consentPage the consent page to redirect to if consent is required (e.g. "/oauth2/consent") + * @param consentPage the URI of the custom consent page to redirect to if consent is required (e.g. "/oauth2/consent") * @return the {@link OAuth2AuthorizationServerConfigurer} for further configuration */ public OAuth2AuthorizationServerConfigurer consentPage(String consentPage) { @@ -296,7 +294,7 @@ public final class OAuth2AuthorizationServerConfigurer"); - builder.append(" "); + builder.append(" "); builder.append(" "); builder.append(" "); } diff --git a/oauth2-authorization-server/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/authorization/OAuth2AuthorizationCodeGrantTests.java b/oauth2-authorization-server/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/authorization/OAuth2AuthorizationCodeGrantTests.java index 05569da1..1258c85b 100644 --- a/oauth2-authorization-server/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/authorization/OAuth2AuthorizationCodeGrantTests.java +++ b/oauth2-authorization-server/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/authorization/OAuth2AuthorizationCodeGrantTests.java @@ -501,7 +501,7 @@ public class OAuth2AuthorizationCodeGrantTests { private static String scopeCheckbox(String scope) { return MessageFormat.format( - "", + "", scope ); } diff --git a/oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/web/OAuth2AuthorizationEndpointFilterTests.java b/oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/web/OAuth2AuthorizationEndpointFilterTests.java index 1d3e1057..653bf5ba 100644 --- a/oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/web/OAuth2AuthorizationEndpointFilterTests.java +++ b/oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/web/OAuth2AuthorizationEndpointFilterTests.java @@ -285,7 +285,7 @@ public class OAuth2AuthorizationEndpointFilterTests { MockHttpServletResponse response = new MockHttpServletResponse(); FilterChain filterChain = mock(FilterChain.class); - this.filter.setUserConsentUri("/oauth2/custom-consent"); + this.filter.setConsentPage("/oauth2/custom-consent"); this.filter.doFilter(request, response, filterChain); verify(this.authenticationManager).authenticate(any()); @@ -471,7 +471,7 @@ public class OAuth2AuthorizationEndpointFilterTests { private static String scopeCheckbox(String scope) { return MessageFormat.format( - "", + "", scope ); } diff --git a/samples/boot/oauth2-integration/authorizationserver-custom-consent-page/src/main/resources/templates/consent.html b/samples/boot/oauth2-integration/authorizationserver-custom-consent-page/src/main/resources/templates/consent.html index fc83f97d..16a99994 100644 --- a/samples/boot/oauth2-integration/authorizationserver-custom-consent-page/src/main/resources/templates/consent.html +++ b/samples/boot/oauth2-integration/authorizationserver-custom-consent-page/src/main/resources/templates/consent.html @@ -42,8 +42,7 @@ type="checkbox" name="scope" th:value="${scope.scope}" - th:id="${scope.scope}" - checked> + th:id="${scope.scope}">

    @@ -60,12 +59,12 @@
    -
    -