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

# Class AssertionResult

java.lang.Object
net.shibboleth.idp.plugin.authn.webauthn.authn.AssertionResult

public final class AssertionResult extends Object
The result of calling `WebAuthnAuthenticationClient.validateAuthenticatorAssertionResponse(String, byte[], com.yubico.webauthn.data.PublicKeyCredentialRequestOptions, com.yubico.webauthn.data.PublicKeyCredential)`.

Note, an instantiatable version of Yubico's AssertionResult.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`AssertionResult.Builder`
The `AssertionResult` builder.
`static interface`
`AssertionResult.IBuildStage`
Builder stage.
`static interface`
`AssertionResult.ISignatureCounterValidStage`
Builder stage.
`static interface`
`AssertionResult.ISuccessStage`
Builder stage.
`static interface`
`AssertionResult.IUserIdStage`
Builder stage.
`static interface`
`AssertionResult.IUsernameStage`
Builder stage.
`static interface`
`AssertionResult.IUserVerifiedStage`
Builder stage.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final boolean`
`signatureCounterValid`
Is the signature count valid?
`private final boolean`
`success`
Is this assertion valid?
`private final byte[]`
`userId`
The user.id.
`private final String`
`username`
The username of the user this result corresponds to.
`private final boolean`
`userVerified`
Was the user verified by the authenticator during authentication?

## Constructor Summary

Constructors
Modifier
Constructor
Description
`private`
`AssertionResult(AssertionResult.Builder builder)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`static AssertionResult.ISuccessStage`
`builder()`
Builder.
`byte[]`
`getUserId()`
Get the user.id of the authenticated user.
`final String`
`getUsername()`
Get the username of the authenticated user.
`final boolean`
`isSignatureCounterValid()`
Is the signature counter valid?
`final boolean`
`isSuccess()`
Is this assertion valid?
`boolean`
`isUserVerified()`
Was the user verified by the authenticator during authentication?

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

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

## Field Details

### success

private final boolean success
Is this assertion valid?

### username

@Nonnull @NotEmpty private final String username
The username of the user this result corresponds to.

### userVerified

private final boolean userVerified
Was the user verified by the authenticator during authentication?

### signatureCounterValid

private final boolean signatureCounterValid
Is the signature count valid?

### userId

private final byte[] userId
The user.id.

## Constructor Details

### AssertionResult

private AssertionResult(AssertionResult.Builder builder)
Constructor.

Parameters:
  `builder` - the builder used to create an instance of this class

## Method Details

### isSuccess

public final boolean isSuccess()
Is this assertion valid?

Returns:
  true if verified, false otherwise.

### getUsername

@Nonnull public final String getUsername()
Get the username of the authenticated user.

Returns:
  the username.

### isSignatureCounterValid

public final boolean isSignatureCounterValid()
Is the signature counter valid?

Returns:
  true if valid, false otherwise.

### getUserId

@Nonnull public byte[] getUserId()
Get the user.id of the authenticated user.

Returns:
  the userId.

### isUserVerified

public boolean isUserVerified()
Was the user verified by the authenticator during authentication?

Returns:
  true if the user was verified, false otherwise.

### builder

public static AssertionResult.ISuccessStage builder()
Builder.

Returns:
  the next stage