Class WebAuthnAuthenticationContext
java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.plugin.authn.webauthn.context.BaseWebAuthnContext
net.shibboleth.idp.plugin.authn.webauthn.context.WebAuthnAuthenticationContext
- All Implemented Interfaces:
Iterable<BaseContext>
Authentication context for processing WebAuthn authentication ceremonies.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext
BaseContext.ContextSetNoRemoveIteratorDecorator, BaseContext.DeprecatedContextClassNameLookAside -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]The credential identifier generated by the authenticator.private booleanAre we operating in passwordless mode.private com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAssertionResponse,com.yubico.webauthn.data.ClientAssertionExtensionOutputs> A public key credential with assertion response that is the result of authentication.private com.yubico.webauthn.data.PublicKeyCredentialRequestOptionsThe public key credential request options for generating an authentication assertion.private booleanAre we operating as a second factor of authentication?private booleanAre we operating in usernameless mode. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Get the credential Id.com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAssertionResponse,com.yubico.webauthn.data.ClientAssertionExtensionOutputs> Get the public key credential with authenticator assertion response, from the authentication ceremony.com.yubico.webauthn.data.PublicKeyCredentialRequestOptionsGet the public key credential request options for generating an authentication assertion.booleanIs this authentication part of a passwordless flow/mode.booleanIs this authentication part of a second factor flow/mode?booleanIs this authentication part of a usernameless flow/mode?setCredentialId(byte[] id) Set the credential Id.setPasswordless(boolean flag) Set if this authentication is part of a passwordless flow/mode.setPublicKeyCredentialAssertionResponse(com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAssertionResponse, com.yubico.webauthn.data.ClientAssertionExtensionOutputs> pkCredAssertion) Set the raw public key credential with authenticator assertion response, returned after the authentication ceremony.setPublicKeyCredentialRequestOptions(com.yubico.webauthn.data.PublicKeyCredentialRequestOptions options) Set the public key credential request options for generating an authentication assertion.setSecondFactor(boolean flag) Set if this authentication is part of a second factor flow/mode.setUsernameless(boolean flag) Set if this authentication is part of a usernameless flow/mode.Methods inherited from class net.shibboleth.idp.plugin.authn.webauthn.context.BaseWebAuthnContext
getExistingCredentials, getRawUsername, getServerChallenge, getUserId, getUsername, getUserVerificationRequirement, isWebAuthnAvailable, setExistingCredentials, setRawUsername, setServerChallenge, setUserId, setUsername, setUserVerificationRequirementMethods inherited from class org.opensaml.messaging.context.BaseContext
addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, ensureSubcontext, ensureSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, iterator, removeFromParent, removeSubcontext, removeSubcontext, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
credentialId
@Nullable private byte[] credentialIdThe credential identifier generated by the authenticator. -
secondFactor
private boolean secondFactorAre we operating as a second factor of authentication? -
passwordless
private boolean passwordlessAre we operating in passwordless mode. -
usernameless
private boolean usernamelessAre we operating in usernameless mode. -
publicKeyCredentialAssertionResponse
@Nullable private com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAssertionResponse,com.yubico.webauthn.data.ClientAssertionExtensionOutputs> publicKeyCredentialAssertionResponseA public key credential with assertion response that is the result of authentication. -
publicKeyCredentialRequestOptions
@Nullable private com.yubico.webauthn.data.PublicKeyCredentialRequestOptions publicKeyCredentialRequestOptionsThe public key credential request options for generating an authentication assertion.
-
-
Constructor Details
-
WebAuthnAuthenticationContext
public WebAuthnAuthenticationContext()
-
-
Method Details
-
getCredentialId
public byte[] getCredentialId()Get the credential Id.- Returns:
- the credential Id.
-
setCredentialId
Set the credential Id.- Parameters:
id- the credential Id.- Returns:
- this context
-
setPublicKeyCredentialRequestOptions
@Nonnull public WebAuthnAuthenticationContext setPublicKeyCredentialRequestOptions(@Nullable com.yubico.webauthn.data.PublicKeyCredentialRequestOptions options) Set the public key credential request options for generating an authentication assertion.- Parameters:
options- the request options to set.- Returns:
- this context
-
getPublicKeyCredentialRequestOptions
@Nullable public com.yubico.webauthn.data.PublicKeyCredentialRequestOptions getPublicKeyCredentialRequestOptions()Get the public key credential request options for generating an authentication assertion.- Returns:
- the public key credential request options.
-
setPublicKeyCredentialAssertionResponse
@Nonnull public WebAuthnAuthenticationContext setPublicKeyCredentialAssertionResponse(@Nullable com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAssertionResponse, com.yubico.webauthn.data.ClientAssertionExtensionOutputs> pkCredAssertion) Set the raw public key credential with authenticator assertion response, returned after the authentication ceremony.- Parameters:
pkCredAssertion- The public key credential containing an authenticator assertion response to set.- Returns:
- this context
-
getPublicKeyCredentialAssertionResponse
@Nullable public com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAssertionResponse,com.yubico.webauthn.data.ClientAssertionExtensionOutputs> getPublicKeyCredentialAssertionResponse()Get the public key credential with authenticator assertion response, from the authentication ceremony.- Returns:
- the public key credential with authenticator a assertion response.
-
setUsernameless
Set if this authentication is part of a usernameless flow/mode.- Parameters:
flag- the flag to indicate the mode of authentication- Returns:
- this context
-
isUsernameless
public boolean isUsernameless()Is this authentication part of a usernameless flow/mode?- Returns:
- true if it is, false otherwise.
-
setPasswordless
Set if this authentication is part of a passwordless flow/mode.- Parameters:
flag- the flag to indicate the mode of authentication- Returns:
- this context
-
isPasswordless
public boolean isPasswordless()Is this authentication part of a passwordless flow/mode.- Returns:
- true if it is, false otherwise.
-
setSecondFactor
Set if this authentication is part of a second factor flow/mode.- Parameters:
flag- the flag to indicate the mode of authentication.- Returns:
- this context
-
isSecondFactor
public boolean isSecondFactor()Is this authentication part of a second factor flow/mode?- Returns:
- true if it is, false otherwise.
-