Package net.shibboleth.idp.plugin.authn.webauthn.context

# 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>`

@NotThreadSafe public final class WebAuthnAuthenticationContext extends BaseWebAuthnContext
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

Fields
Modifier and Type
Field
Description
`private byte[]`
`credentialId`
The credential identifier generated by the authenticator.
`private boolean`
`passwordless`
Are we operating in passwordless mode.
`private com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAssertionResponse,com.yubico.webauthn.data.ClientAssertionExtensionOutputs>`
`publicKeyCredentialAssertionResponse`
A public key credential with assertion response that is the result of authentication.
`private com.yubico.webauthn.data.PublicKeyCredentialRequestOptions`
`publicKeyCredentialRequestOptions`
The public key credential request options for generating an authentication assertion.
`private boolean`
`secondFactor`
Are we operating as a second factor of authentication?
`private boolean`
`usernameless`
Are we operating in usernameless mode.

## Constructor Summary

Constructors
Constructor
Description
`WebAuthnAuthenticationContext()`

## Method Summary

Modifier and Type
Method
Description
`byte[]`
`getCredentialId()`
Get the credential Id.
`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.
`com.yubico.webauthn.data.PublicKeyCredentialRequestOptions`
`getPublicKeyCredentialRequestOptions()`
Get the public key credential request options for generating an authentication assertion.
`boolean`
`isPasswordless()`
Is this authentication part of a passwordless flow/mode.
`boolean`
`isSecondFactor()`
Is this authentication part of a second factor flow/mode?
`boolean`
`isUsernameless()`
Is this authentication part of a usernameless flow/mode?
`WebAuthnAuthenticationContext`
`setCredentialId(byte[] id)`
Set the credential Id.
`WebAuthnAuthenticationContext`
`setPasswordless(boolean flag)`
Set if this authentication is part of a passwordless flow/mode.
`WebAuthnAuthenticationContext`
`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.
`WebAuthnAuthenticationContext`
`setPublicKeyCredentialRequestOptions(com.yubico.webauthn.data.PublicKeyCredentialRequestOptions options)`
Set the public key credential request options for generating an authentication assertion.
`WebAuthnAuthenticationContext`
`setSecondFactor(boolean flag)`
Set if this authentication is part of a second factor flow/mode.
`WebAuthnAuthenticationContext`
`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, setUserVerificationRequirement`

### Methods inherited from class org.opensaml.messaging.context.BaseContext

`addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, ensureSubcontext, ensureSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, iterator, removeFromParent, removeSubcontext, removeSubcontext, setParent`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

## Field Details

### credentialId

@Nullable private byte[] credentialId
The credential identifier generated by the authenticator.

### secondFactor

private boolean secondFactor
Are we operating as a second factor of authentication?

### passwordless

private boolean passwordless
Are we operating in passwordless mode.

### usernameless

private boolean usernameless
Are we operating in usernameless mode.

### publicKeyCredentialAssertionResponse

@Nullable private com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAssertionResponse,com.yubico.webauthn.data.ClientAssertionExtensionOutputs> publicKeyCredentialAssertionResponse
A public key credential with assertion response that is the result of authentication.

### publicKeyCredentialRequestOptions

@Nullable private com.yubico.webauthn.data.PublicKeyCredentialRequestOptions publicKeyCredentialRequestOptions
The 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

public WebAuthnAuthenticationContext setCredentialId(@Nonnull byte[] id)
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

@Nonnull public WebAuthnAuthenticationContext setUsernameless(boolean flag)
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

@Nonnull public WebAuthnAuthenticationContext setPasswordless(boolean flag)
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

@Nonnull public WebAuthnAuthenticationContext setSecondFactor(boolean flag)
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.