Class StepUpProblemMapper
java.lang.Object
com.irurueta.authserver.bff.api.web.documents.StepUpProblemMapper
Maps a step-up request of the resource server onto the extra members of the
step-up-required problem, the
values the SPA passes back to GET /bff/login. They are values the resource server chose, so they are kept
within what that endpoint accepts, otherwise the login would answer 400 and the user could never step up:
acrValues: only the references of the accepted format are kept, and none at all when the result would be empty or longer than the login allows;maxAge: capped at the login's maximum, which is stricter than what the resource server asked for, so the new sign-in still satisfies it.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final StringProblem member carrying the authentication context classes.private static final StringSeparator of the authentication context class references: any run of whitespace.(package private) static final StringProblem member carrying the maximum age, in seconds. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringacceptedAcrValues(String acrValues) Keeps the authentication context class references of the format the login accepts.Builds the extra problem members of a step-up request.
-
Field Details
-
ACR_VALUES_PROPERTY
Problem member carrying the authentication context classes.- See Also:
-
MAX_AGE_PROPERTY
Problem member carrying the maximum age, in seconds.- See Also:
-
ACR_VALUES_SEPARATOR
Separator of the authentication context class references: any run of whitespace.- See Also:
-
-
Constructor Details
-
StepUpProblemMapper
public StepUpProblemMapper()
-
-
Method Details
-
toProblemProperties
Builds the extra problem members of a step-up request.- Parameters:
exception- the step-up request, with the values the resource server asked for.- Returns:
- the members, in a stable order; empty when the resource server named no usable value.
-
acceptedAcrValues
Keeps the authentication context class references of the format the login accepts.- Parameters:
acrValues- space-separated references.- Returns:
- the accepted ones, separated by one space; empty when none is.
-