Is there a way to configure multiple authorization endpoints within AuthorizationServerSettings?

30 views Asked by At

Currently the AuthorizationServerSettings class within the spring-security-oauth2-authorization-server provide the ability to declare custom endpoints. A config similar to below:

  @Bean
  public AuthorizationServerSettings authorizationServerSettings() {
     return AuthorizationServerSettings.builder()
     .authorizationEndpoint("/oauth/authorize")
     .tokenEndpoint("/oauth/token")
     .jwkSetEndpoint("oauth/jwks")
     .tokenRevocationEndpoint("oauth/revoke")
     .tokenIntrospectionEndpoint("oauth/introspect")
     .oidcClientRegistrationEndpoint("oauth/register")
     .oidcUserInfoEndpoint("oauth/userinfo")
     .build();
  }

However, is there a way I can provide multiple endpoints? For example, can I have 2 /authorize endpoints? One will be /oauth/authorize and another one will be oauth/another/authorize

I did try to work with wildcard character (*) but was not able to get the expected behavior.

Expected Behavior: When we access any one of the endpoints, it should pop up the login page and after logging in we should get an authorization code.

0

There are 0 answers