Class BffLoginController
java.lang.Object
com.irurueta.authserver.bff.api.web.login.BffLoginController
- All Implemented Interfaces:
LoginApi
Starts the OpenID Connect login, as the contract
apis/bff/rest-server/bff-api-v1.yaml describes it through
the generated LoginApi.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final StringAuthorization request endpoint of thebffregistration.(package private) static final StringWhere the browser goes when the login is requested withoutreturnTo.private final jakarta.servlet.http.HttpServletRequestThe current request, injected as a thread-bound proxy.private final ReturnToValidatorDecides whichreturnTovalues are safe.Fields inherited from interface com.irurueta.authserver.bff.api.web.v1.generated.api.LoginApi
PATH_LOGIN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> ValidatesreturnTo, keeps it in the session forReturnToAuthenticationSuccessHandler, which sends the browser there once the OAuth2 login succeeds, keeps the step-up values (if any) forStepUpAuthorizationRequestResolver, which adds them to the authorization request, and redirects to the authorization request.
-
Field Details
-
DEFAULT_RETURN_TO
Where the browser goes when the login is requested withoutreturnTo.- See Also:
-
AUTHORIZATION_PATH
Authorization request endpoint of thebffregistration.- See Also:
-
returnToValidator
Decides whichreturnTovalues are safe. -
request
private final jakarta.servlet.http.HttpServletRequest requestThe current request, injected as a thread-bound proxy.
-
-
Constructor Details
-
BffLoginController
public BffLoginController()
-
-
Method Details
-
login
public org.springframework.http.ResponseEntity<Void> login(String returnTo, String acrValues, Long maxAge) ValidatesreturnTo, keeps it in the session forReturnToAuthenticationSuccessHandler, which sends the browser there once the OAuth2 login succeeds, keeps the step-up values (if any) forStepUpAuthorizationRequestResolver, which adds them to the authorization request, and redirects to the authorization request. The format and range ofacrValuesandmaxAgeare checked by the generated interface.- Specified by:
loginin interfaceLoginApi- Parameters:
returnTo- relative path to return to after the login; the root of the application when absent.acrValues- authentication context classes to ask the authorization server for; none when absent.maxAge- maximum age, in seconds, of the authentication to ask for; none when absent.- Returns:
- a redirect to the authorization request.
- Throws:
org.springframework.web.server.ResponseStatusException- answered 400 whenreturnTois not an allowed relative path.
-