Class WebAuthnRegistrationContext
java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.plugin.authn.webauthn.context.BaseWebAuthnContext
net.shibboleth.idp.plugin.authn.webauthn.context.WebAuthnRegistrationContext
- All Implemented Interfaces:
Iterable<BaseContext>
Registration context for processing WebAuthn Registration Ceremonies. This context is intended for registration of
a single credential only. A context would be needed per credential registration.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext
BaseContext.ContextSetNoRemoveIteratorDecorator, BaseContext.DeprecatedContextClassNameLookAside -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.yubico.webauthn.data.AttestationConveyancePreferenceThe attestation conveyance preference.private com.yubico.webauthn.data.AuthenticatorAttachmentThe authenticator attachment requirement (cross-platform or platform).private byte[]The ID of a credential that is going to be modified in some way.private byte[]The ID of a credential that is going to be removed.private StringA display friendly nickname for the credential that is to be registered.private StringThe user.displayName supplied to the authenticator during generation of a new credential.private StringThe WebAuthn user.name of the user.private booleanIs nickname collection enabled or disabled?.private com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAttestationResponse,com.yubico.webauthn.data.ClientRegistrationExtensionOutputs> A public key credential containing the assertion response that is the result of creating a new credential.private com.yubico.webauthn.data.PublicKeyCredentialCreationOptionsThe public key credential creation options for creating a new credential.private RegistrationResultThe credential public key which is the result of registration of a new key pair generated by an authenticator.private com.yubico.webauthn.data.ResidentKeyRequirementThe requirement on registering a ResidentKey. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.yubico.webauthn.data.AttestationConveyancePreferenceGet the attestation conveyance preference.com.yubico.webauthn.data.AuthenticatorAttachmentGet the authenticator attachment requirement.byte[]Get the ID of the credential that is going to be modified.byte[]Get the ID of the credential that is going to be removed.Get the display friendly nickname for this credential.Get the human-palatable name for the user account.getName()The WebAuthn user.name of the user to use during credential registration.com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAttestationResponse,com.yubico.webauthn.data.ClientRegistrationExtensionOutputs> Get the public key credential containing the attestation response as a result of creating a new credential.com.yubico.webauthn.data.PublicKeyCredentialCreationOptionsGet the options used to create public key credentials.Get the credential public key which is the result of registration of a new key pair generated by the authenticator.com.yubico.webauthn.data.ResidentKeyRequirementGet the ResidentKey requirement.booleanIs nickname collection required or not.setAttestationConveyancePreference(com.yubico.webauthn.data.AttestationConveyancePreference preference) Set the attestation conveyance preference.setAuthenticatorAttachmentRequirement(com.yubico.webauthn.data.AuthenticatorAttachment requirement) Set the authenticator attachment requirement.setCredentialIdToModify(byte[] id) Set the ID of the credential that is going to be modified.setCredentialIdToRemove(byte[] id) Deprecated, for removal: This API element is subject to removal in a future version.setCredentialNickname(String nickname) Set the display friendly nickname for this credential.setDisplayName(String dispName) Set the human-palatable name for the user account.Set the WebAuthn user.name of the user to use during credential registration.setNicknameRequired(boolean flag) Set if nickname collection is required or not.setPublicKeyCredentialAttestationResponse(com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAttestationResponse, com.yubico.webauthn.data.ClientRegistrationExtensionOutputs> pkCredAttestation) Set the public key credential containing the attestation response as a result of creating a new credential.setPublicKeyCredentialCreationOptions(com.yubico.webauthn.data.PublicKeyCredentialCreationOptions options) Set the options used to create public key credentials.Set the registration result which is the result of registration of a new key pair generated by an authenticator.setResidentKeyRequirement(com.yubico.webauthn.data.ResidentKeyRequirement requirement) Set the ResidentKey requirement.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
-
name
The WebAuthn user.name of the user. A human-palatable identifier for a user account. It is intended only for display by the authenticator, and to help the user select between accounts. -
publicKeyCredentialAttestationResponse
@Nullable private com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAttestationResponse,com.yubico.webauthn.data.ClientRegistrationExtensionOutputs> publicKeyCredentialAttestationResponseA public key credential containing the assertion response that is the result of creating a new credential. -
publicKeyCredentialCreationOptions
@Nullable private com.yubico.webauthn.data.PublicKeyCredentialCreationOptions publicKeyCredentialCreationOptionsThe public key credential creation options for creating a new credential. -
registrationResult
The credential public key which is the result of registration of a new key pair generated by an authenticator. -
credentialNickname
A display friendly nickname for the credential that is to be registered. -
credentialIdToRemove
@Nullable private byte[] credentialIdToRemoveThe ID of a credential that is going to be removed. -
residentKeyRequirement
@Nullable private com.yubico.webauthn.data.ResidentKeyRequirement residentKeyRequirementThe requirement on registering a ResidentKey. Also know as a discoverable credential. -
authenticatorAttachmentRequirement
@Nullable private com.yubico.webauthn.data.AuthenticatorAttachment authenticatorAttachmentRequirementThe authenticator attachment requirement (cross-platform or platform).nullwould represent either possibility. -
attestationConveyancePreference
@Nullable private com.yubico.webauthn.data.AttestationConveyancePreference attestationConveyancePreferenceThe attestation conveyance preference. -
displayName
The user.displayName supplied to the authenticator during generation of a new credential. A human-palatable name for the user account, intended only for display. -
nicknameRequired
private boolean nicknameRequiredIs nickname collection enabled or disabled?. -
credentialIdToModify
@Nullable private byte[] credentialIdToModifyThe ID of a credential that is going to be modified in some way.
-
-
Constructor Details
-
WebAuthnRegistrationContext
public WebAuthnRegistrationContext()
-
-
Method Details
-
isNicknameRequired
public boolean isNicknameRequired()Is nickname collection required or not. The nickname is used for display purposes only.- Returns:
- true if the nickname is required, false otherwise.
- Since:
- 1.1.0
-
setNicknameRequired
Set if nickname collection is required or not. The nickname is used for display purposes only.- Parameters:
flag- the flag to set- Returns:
- this context
- Since:
- 1.1.0
-
setName
Set the WebAuthn user.name of the user to use during credential registration. A human-palatable identifier for a user account. It is intended only for display.- Parameters:
webAuthnName- The WebAuthn user.name to set.- Returns:
- this context
-
getName
The WebAuthn user.name of the user to use during credential registration. A human-palatable identifier for a user account. It is intended only for display.- Returns:
- the WebAuthn user.name.
-
setAuthenticatorAttachmentRequirement
public WebAuthnRegistrationContext setAuthenticatorAttachmentRequirement(@Nullable com.yubico.webauthn.data.AuthenticatorAttachment requirement) Set the authenticator attachment requirement.nullwould represent either possibility.- Parameters:
requirement- The authenticatorAttachmentRequirement to set.- Returns:
- this context
-
getAuthenticatorAttachmentRequirement
public com.yubico.webauthn.data.AuthenticatorAttachment getAuthenticatorAttachmentRequirement()Get the authenticator attachment requirement.nullwould represent either possibility.- Returns:
- the authenticator attachment requirement.
-
getPublicKeyCredentialAttestationResponse
@Nullable public com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAttestationResponse,com.yubico.webauthn.data.ClientRegistrationExtensionOutputs> getPublicKeyCredentialAttestationResponse()Get the public key credential containing the attestation response as a result of creating a new credential.- Returns:
- the authenticator attestation response.
-
setPublicKeyCredentialAttestationResponse
@Nonnull public WebAuthnRegistrationContext setPublicKeyCredentialAttestationResponse(@Nullable com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAttestationResponse, com.yubico.webauthn.data.ClientRegistrationExtensionOutputs> pkCredAttestation) Set the public key credential containing the attestation response as a result of creating a new credential.- Parameters:
pkCredAttestation- The public key credential containing the attestation response to set.- Returns:
- this context
-
setPublicKeyCredentialCreationOptions
@Nonnull public WebAuthnRegistrationContext setPublicKeyCredentialCreationOptions(@Nullable com.yubico.webauthn.data.PublicKeyCredentialCreationOptions options) Set the options used to create public key credentials.- Parameters:
options- The public key credential creation options to set.- Returns:
- this context
-
getPublicKeyCredentialCreationOptions
@Nullable public com.yubico.webauthn.data.PublicKeyCredentialCreationOptions getPublicKeyCredentialCreationOptions()Get the options used to create public key credentials.- Returns:
- the publicKeyCredentialCreationOptions
-
setRegistrationResult
@Nonnull public WebAuthnRegistrationContext setRegistrationResult(@Nullable RegistrationResult result) Set the registration result which is the result of registration of a new key pair generated by an authenticator.- Parameters:
result- the registration result to set.- Returns:
- this context
-
getRegistrationResult
Get the credential public key which is the result of registration of a new key pair generated by the authenticator.- Returns:
- Returns the registrationResult.
-
setCredentialNickname
Set the display friendly nickname for this credential.- Parameters:
nickname- The credential nickname to set.- Returns:
- this context
-
getCredentialNickname
Get the display friendly nickname for this credential.- Returns:
- the credential nickname.
-
setCredentialIdToRemove
@Deprecated(since="1.2.0", forRemoval=true) @Nonnull public WebAuthnRegistrationContext setCredentialIdToRemove(@Nullable byte[] id) Deprecated, for removal: This API element is subject to removal in a future version.UsesetCredentialIdToModify(byte[])insteadSet the ID of the credential that is going to be removed.- Parameters:
id- the credential identifier- Returns:
- this context
-
getCredentialIdToRemove
@Nullable public byte[] getCredentialIdToRemove()Get the ID of the credential that is going to be removed.- Returns:
- Returns the credentialIdToRemove.
-
setResidentKeyRequirement
@Nonnull public WebAuthnRegistrationContext setResidentKeyRequirement(@Nullable com.yubico.webauthn.data.ResidentKeyRequirement requirement) Set the ResidentKey requirement. A residenty key is also known as a discoverable credential.- Parameters:
requirement- The resident key requirement to set.- Returns:
- this context
-
getResidentKeyRequirement
@Nullable public com.yubico.webauthn.data.ResidentKeyRequirement getResidentKeyRequirement()Get the ResidentKey requirement. A residenty key is also known as a discoverable credential.- Returns:
- the requirement.
-
setAttestationConveyancePreference
@Nonnull public BaseWebAuthnContext setAttestationConveyancePreference(@Nullable com.yubico.webauthn.data.AttestationConveyancePreference preference) Set the attestation conveyance preference.- Parameters:
preference- the attestation conveyance preference- Returns:
- this context
-
getAttestationConveyancePreference
@Nullable public com.yubico.webauthn.data.AttestationConveyancePreference getAttestationConveyancePreference()Get the attestation conveyance preference.- Returns:
- the attestationConveyancePreference.
-
setDisplayName
Set the human-palatable name for the user account.- Parameters:
dispName- The display name to set.- Returns:
- this context
-
getDisplayName
Get the human-palatable name for the user account.- Returns:
- the displayName.
-
setCredentialIdToModify
Set the ID of the credential that is going to be modified.- Parameters:
id- the credential identifier- Returns:
- this context
- Since:
- 1.2.0
-
getCredentialIdToModify
@Nullable public byte[] getCredentialIdToModify()Get the ID of the credential that is going to be modified.- Returns:
- the identifier of the credential to be modified.
- Since:
- 1.2.0
-
setCredentialIdToModify(byte[])instead