Class OttSecondFactorFragment
java.lang.Object
com.irurueta.authserver.authorization.api.web.ott.OttSecondFactorFragment
- All Implemented Interfaces:
SecondFactorFragment
Contributes the one-time token second factor to the second-factor page: the buttons that send a code or a magic link
by e-mail and a code by SMS to the signed-in user, each posting to
POST /ott/generate with the second-factor
purpose. Only the channels OttSecondFactorChannels allows are offered: never the one that signed the user in,
SMS only to a user with a verified phone, and e-mail only to a user without any other confirmed second factor.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringModel attribute telling the fragment whether to offer the e-mail code and link.static final intPosition of the one-time token action in the second-factor page: after the passkey one.private final OttSecondFactorChannelsDecides which channels may be the second factor of the user.static final StringModel attribute telling the fragment whether to offer the SMS code. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the fragment of the template.modelAttributes(org.springframework.security.core.Authentication authentication) Tells the template which channels to offer.intorder()Gets the position of the fragment.Gets the template that holds the fragment.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.irurueta.authserver.authorization.api.web.mfa.SecondFactorFragment
reference
-
Field Details
-
ORDER
public static final int ORDERPosition of the one-time token action in the second-factor page: after the passkey one.- See Also:
-
EMAIL_AVAILABLE_ATTRIBUTE
Model attribute telling the fragment whether to offer the e-mail code and link.- See Also:
-
SMS_AVAILABLE_ATTRIBUTE
Model attribute telling the fragment whether to offer the SMS code.- See Also:
-
secondFactorChannels
Decides which channels may be the second factor of the user.
-
-
Constructor Details
-
OttSecondFactorFragment
public OttSecondFactorFragment()
-
-
Method Details
-
templateName
Gets the template that holds the fragment.- Specified by:
templateNamein interfaceSecondFactorFragment- Returns:
ott-second-factor.
-
fragmentName
Gets the fragment of the template.- Specified by:
fragmentNamein interfaceSecondFactorFragment- Returns:
form.
-
order
public int order()Gets the position of the fragment.- Specified by:
orderin interfaceSecondFactorFragment- Returns:
ORDER.
-
modelAttributes
public Map<String,Object> modelAttributes(org.springframework.security.core.Authentication authentication) Tells the template which channels to offer.- Specified by:
modelAttributesin interfaceSecondFactorFragment- Parameters:
authentication- the authentication of the user the page is rendered for.- Returns:
- the model attributes; none when nobody is signed in.
-