Class WebAuthnAuthentication
java.lang.Object
com.codename1.backend.security.AbstractAuthenticationToken
com.codename1.backend.security.webauthn.WebAuthnAuthentication
- All Implemented Interfaces:
Authentication
Who signed in with a passkey.
The principal is the PublicKeyCredentialUserEntity of the user; the name
is the user's name, the one the application's user store knows them by,
and the authorities are the ones that store gives them. Beside those it
says which credential signed, and whether the authenticator verified the
user for it.
It stays one on the requests that follow: the session keeps what is here.
-
Constructor Summary
ConstructorsConstructorDescriptionWebAuthnAuthentication(PublicKeyCredentialUserEntity principal, Collection<? extends GrantedAuthority> authorities, byte[] credentialId, boolean userVerified) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]The id of the credential that signed, or null.What proves the principal is who it says: a password, usually, and null once it has been checked.getName()The principal's name.The identity: a username before authentication, and afterwards usually theUserDetailsit was resolved to.booleanWhether the authenticator verified the user -- a PIN, a fingerprint, a face -- so that the sign-in is two factors by itself.Methods inherited from class AbstractAuthenticationToken
eraseCredentials, getAuthorities, getDetails, isAuthenticated, setAuthenticated, setDetails, toString
-
Constructor Details
-
WebAuthnAuthentication
public WebAuthnAuthentication(PublicKeyCredentialUserEntity principal, Collection<? extends GrantedAuthority> authorities, byte[] credentialId, boolean userVerified) - Parameters:
credentialId- the credential that signed; may be null when it is not known
-
-
Method Details
-
getPrincipal
Description copied from interface:AuthenticationThe identity: a username before authentication, and afterwards usually theUserDetailsit was resolved to. -
getCredentials
Description copied from interface:AuthenticationWhat proves the principal is who it says: a password, usually, and null once it has been checked. -
getName
Description copied from interface:AuthenticationThe principal's name.- Specified by:
getNamein interfaceAuthentication- Overrides:
getNamein classAbstractAuthenticationToken
-
getCredentialId
public byte[] getCredentialId()The id of the credential that signed, or null. -
isUserVerified
public boolean isUserVerified()Whether the authenticator verified the user -- a PIN, a fingerprint, a face -- so that the sign-in is two factors by itself.
-