Class AadB2cAuthorizationRequestResolver

java.lang.Object
com.azure.spring.cloud.autoconfigure.aadb2c.AadB2cAuthorizationRequestResolver
All Implemented Interfaces:
org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolver

public class AadB2cAuthorizationRequestResolver extends Object implements org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolver
This class handles the OAuth2 request procession for AAD B2C authorization.

Userflow name is added in the request link and forgotten password redirection to password-reset page is added on the base of default OAuth2 authorization resolve.

  • Constructor Details

    • AadB2cAuthorizationRequestResolver

      public AadB2cAuthorizationRequestResolver(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository repository, AadB2cProperties properties)
      Creates a new instance of AadB2cAuthorizationRequestResolver.
      Parameters:
      repository - the client registration repository
      properties - the AAD B2C properties
    • AadB2cAuthorizationRequestResolver

      public AadB2cAuthorizationRequestResolver(AadB2cProperties properties, org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolver delegateResolver)
      Creates a new instance of AadB2cAuthorizationRequestResolver.
      Parameters:
      properties - the AAD B2C properties.
      delegateResolver - the delegate resolver.
  • Method Details

    • resolve

      public org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest resolve(jakarta.servlet.http.HttpServletRequest request)
      Returns the OAuth2AuthorizationRequest resolved from the provided HttpServletRequest or null if not available.
      Specified by:
      resolve in interface org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolver
      Parameters:
      request - the HttpServletRequest
      Returns:
      the resolved OAuth2AuthorizationRequest or null if not available
    • resolve

      public org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest resolve(jakarta.servlet.http.HttpServletRequest request, String registrationId)
      Returns the OAuth2AuthorizationRequest resolved from the provided HttpServletRequest or null if not available.
      Specified by:
      resolve in interface org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolver
      Parameters:
      request - the HttpServletRequest
      registrationId - the registrationId to use
      Returns:
      the resolved OAuth2AuthorizationRequest or null if not available