Class DefaultAuthorizationRedirectHandler

java.lang.Object
io.micronaut.security.oauth2.endpoint.authorization.request.DefaultAuthorizationRedirectHandler
All Implemented Interfaces:
AuthorizationRedirectHandler

@Singleton public class DefaultAuthorizationRedirectHandler extends Object implements AuthorizationRedirectHandler
Builds an authorization redirect url.
Since:
1.2.0
Author:
Sergio del Amo
  • Constructor Details

    • DefaultAuthorizationRedirectHandler

      public DefaultAuthorizationRedirectHandler()
  • Method Details

    • redirect

      public io.micronaut.http.MutableHttpResponse redirect(AuthorizationRequest authorizationRequest, String authorizationEndpoint)
      Description copied from interface: AuthorizationRedirectHandler
      Builds the URL string to redirect to.
      Specified by:
      redirect in interface AuthorizationRedirectHandler
      Parameters:
      authorizationRequest - The authorization request
      authorizationEndpoint - The authorization endpoint
      Returns:
      The authorization redirect url
    • expandedUri

      protected String expandedUri(@NonNull @NonNull String baseUrl, @NonNull @NonNull Map<String,Object> queryParams)
      Parameters:
      baseUrl - Base Url
      queryParams - Query Parameters
      Returns:
      The Expanded URI
    • instantiateParameters

      protected Map<String,Object> instantiateParameters(AuthorizationRequest authorizationRequest, io.micronaut.http.MutableHttpResponse response)
      Parameters:
      authorizationRequest - Authentication Request
      response - Authorization Redirect Response
      Returns:
      A parameter map which contains the URL variables used to construct the authorization redirect url.
    • populateScope

      protected void populateScope(@NonNull @NonNull AuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
    • populateResponseType

      protected void populateResponseType(@NonNull @NonNull AuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
    • populateClientId

      protected void populateClientId(@NonNull @NonNull AuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
    • populateRedirectUri

      protected void populateRedirectUri(@NonNull @NonNull AuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
    • populateState

      protected void populateState(@NonNull @NonNull AuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters, @NonNull @NonNull io.micronaut.http.MutableHttpResponse response)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
      response - Authorization Redirect Response
    • populatePKCE

      protected void populatePKCE(@NonNull @NonNull AuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters, @NonNull @NonNull io.micronaut.http.MutableHttpResponse<?> response)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
      response - Authorization Redirect Response
    • populateResponseMode

      protected void populateResponseMode(@NonNull @NonNull OpenIdAuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
    • populateNonce

      protected void populateNonce(@NonNull @NonNull OpenIdAuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters, @NonNull @NonNull io.micronaut.http.MutableHttpResponse response)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
      response - Authorization Redirect Response
    • populateDisplay

      protected void populateDisplay(@NonNull @NonNull OpenIdAuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
    • populatePrompt

      protected void populatePrompt(@NonNull @NonNull OpenIdAuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
    • populateMaxAge

      protected void populateMaxAge(@NonNull @NonNull OpenIdAuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
    • populateUiLocales

      protected void populateUiLocales(@NonNull @NonNull OpenIdAuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
    • populateIdTokenHint

      protected void populateIdTokenHint(@NonNull @NonNull OpenIdAuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
    • populateLoginHint

      protected void populateLoginHint(@NonNull @NonNull OpenIdAuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters
    • populateAcrValues

      protected void populateAcrValues(@NonNull @NonNull OpenIdAuthorizationRequest authorizationRequest, @NonNull @NonNull Map<String,Object> parameters)
      Parameters:
      authorizationRequest - Authentication Request
      parameters - Authentication Request Parameters