Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public final class WebAuthnAuthentication

  1. Object
  2. AbstractAuthenticationToken
  3. WebAuthnAuthentication

ImplementsAuthentication

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.

Constructors

public WebAuthnAuthentication(PublicKeyCredentialUserEntity principal, Collection<? extends GrantedAuthority> authorities, byte[] credentialId, boolean userVerified)

Methods

public PublicKeyCredentialUserEntity getPrincipal()The identity: a username before authentication, and afterwards usually the UserDetails it was resolved to.
public Object getCredentials()What proves the principal is who it says: a password, usually, and null once it has been checked.
public String getName()The principal’s name.
public byte[] getCredentialId()The id of the credential that signed, or null.
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.

Inherited methods

Constructor details

WebAuthnAuthentication

public WebAuthnAuthentication(PublicKeyCredentialUserEntity principal, Collection<? extends GrantedAuthority> authorities, byte[] credentialId, boolean userVerified)

Parameters

principal PublicKeyCredentialUserEntity
Not documented.
authorities Collection<? extends GrantedAuthority>
Not documented.
credentialId byte[]
the credential that signed; may be null when it is not known
userVerified boolean
Not documented.

Method details

getPrincipal

public PublicKeyCredentialUserEntity getPrincipal()
The identity: a username before authentication, and afterwards usually the UserDetails it was resolved to.

getCredentials

public Object getCredentials()
What proves the principal is who it says: a password, usually, and null once it has been checked.

getName

public String getName()
The principal’s name.

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.