Class StepUpAuthorizationRequestResolver
java.lang.Object
com.irurueta.authserver.bff.api.web.login.StepUpAuthorizationRequestResolver
- All Implemented Interfaces:
org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolver
public class StepUpAuthorizationRequestResolver
extends Object
implements org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolver
Adds the step-up values that
BffLoginController kept in the session to the authorization request built by the
delegate, as the OpenID Connect acr_values and max_age parameters, and forgets them, so they apply to
one login only. Without them the authorization request is the delegate's, unchanged.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final StringAuthorization request parameter naming the authentication context classes asked for.private final org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolverBuilds the authorization request.(package private) static final StringAuthorization request parameter naming the maximum age of the authentication, in seconds.static final StringSession attribute holding theStepUpLoginParametersof the next login. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequestresolve(jakarta.servlet.http.HttpServletRequest request) org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequestprivate static org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequestwithStepUp(jakarta.servlet.http.HttpServletRequest request, org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest authorizationRequest) Adds the step-up values of the session, if any, to an authorization request and removes them from the session.
-
Field Details
-
STEP_UP_ATTRIBUTE
Session attribute holding theStepUpLoginParametersof the next login. -
ACR_VALUES_PARAMETER
Authorization request parameter naming the authentication context classes asked for.- See Also:
-
MAX_AGE_PARAMETER
Authorization request parameter naming the maximum age of the authentication, in seconds.- See Also:
-
delegate
private final org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolver delegateBuilds the authorization request.
-
-
Constructor Details
-
StepUpAuthorizationRequestResolver
public StepUpAuthorizationRequestResolver()
-
-
Method Details
-
resolve
public org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest resolve(jakarta.servlet.http.HttpServletRequest request) - Specified by:
resolvein interfaceorg.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolver
-
resolve
public org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest resolve(jakarta.servlet.http.HttpServletRequest request, String clientRegistrationId) - Specified by:
resolvein interfaceorg.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolver
-
withStepUp
private static org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest withStepUp(jakarta.servlet.http.HttpServletRequest request, org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest authorizationRequest) Adds the step-up values of the session, if any, to an authorization request and removes them from the session.- Parameters:
request- the current request.authorizationRequest- the authorization request of the delegate;nullwhen the request is not an authorization request.- Returns:
- the authorization request with the step-up parameters, or as it was when the session holds none.
-