Class PasskeySecondFactorFragment
java.lang.Object
com.irurueta.authserver.authorization.api.web.passkeys.PasskeySecondFactorFragment
- All Implemented Interfaces:
SecondFactorFragment
Contributes the "use a passkey" action to the second-factor page. The only data it needs is whether the signed-in
user has a passkey at all: the options of the ceremony are asked from the framework endpoint, which, for a signed-in
session, only allows the credentials of that user.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringModel attribute telling the fragment whether the user has a passkey to present.private final HasConfirmedPasskeyUseCaseTells whether the user has a registered passkey.static final intPosition of the passkey action in the second-factor page: after the TOTP forms.private final SecondFactorUserResolverResolves the identifier of the account of the signed-in user. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the fragment of the template.modelAttributes(org.springframework.security.core.Authentication authentication) Tells the template whether to offer the passkey.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 passkey action in the second-factor page: after the TOTP forms.- See Also:
-
AVAILABLE_ATTRIBUTE
Model attribute telling the fragment whether the user has a passkey to present.- See Also:
-
userResolver
Resolves the identifier of the account of the signed-in user. -
hasConfirmedPasskeyUseCase
Tells whether the user has a registered passkey.
-
-
Constructor Details
-
PasskeySecondFactorFragment
public PasskeySecondFactorFragment()
-
-
Method Details
-
templateName
Gets the template that holds the fragment.- Specified by:
templateNamein interfaceSecondFactorFragment- Returns:
passkeys-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 whether to offer the passkey.- 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.
-