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

# Class AssertionResult.Builder

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

All Implemented Interfaces:
  `AssertionResult.IBuildStage`, `AssertionResult.ISignatureCounterValidStage`, `AssertionResult.ISuccessStage`, `AssertionResult.IUserIdStage`, `AssertionResult.IUsernameStage`, `AssertionResult.IUserVerifiedStage`

Enclosing class:
  AssertionResult

public static final class AssertionResult.Builder extends Object implements AssertionResult.ISuccessStage, AssertionResult.IUsernameStage, AssertionResult.ISignatureCounterValidStage, AssertionResult.IUserIdStage, AssertionResult.IUserVerifiedStage, AssertionResult.IBuildStage
The `AssertionResult` builder.

## Field Summary

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

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`AssertionResult`
`build()`
Build the result.
`AssertionResult.IUserIdStage`
`withSignatureCounterValid(boolean sigCounterValid)`
Set if the signature counter is valid.
`AssertionResult.IUsernameStage`
`withSuccess(boolean successIn)`
Set if this assertion was verified.
`AssertionResult.IUserVerifiedStage`
`withUserId(byte[] id)`
Set the user.id.
`AssertionResult.ISignatureCounterValidStage`
`withUsername(String uname)`
Set the user.name of the authenticated user.
`AssertionResult.IBuildStage`
`withUserVerified(boolean uv)`
Set the userVerified flag.

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

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

## Field Details

### success

private boolean success
Is this assertion valid?

### username

private String username
The username of the user this result corresponds to.

### signatureCounterValid

private boolean signatureCounterValid
Is the signature count valid?

### userId

private byte[] userId
The user.id.

### userVerified

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

## Constructor Details

### Builder

private Builder()
Constructor.

## Method Details

### withSuccess

public AssertionResult.IUsernameStage withSuccess(boolean successIn)
Description copied from interface: `AssertionResult.ISuccessStage`
Set if this assertion was verified.

Specified by:
  `withSuccess` in interface `AssertionResult.ISuccessStage`
Parameters:
  `successIn` - true if the assertion was verified, false otherwise.
Returns:
  the next stage

### withUsername

public AssertionResult.ISignatureCounterValidStage withUsername(String uname)
Description copied from interface: `AssertionResult.IUsernameStage`
Set the user.name of the authenticated user.

Specified by:
  `withUsername` in interface `AssertionResult.IUsernameStage`
Parameters:
  `uname` - the user.name
Returns:
  the next stage

### withSignatureCounterValid

public AssertionResult.IUserIdStage withSignatureCounterValid(boolean sigCounterValid)
Description copied from interface: `AssertionResult.ISignatureCounterValidStage`
Set if the signature counter is valid.

Specified by:
  `withSignatureCounterValid` in interface `AssertionResult.ISignatureCounterValidStage`
Parameters:
  `sigCounterValid` - true if valid, false otherwise.
Returns:
  the next stage

### withUserId

public AssertionResult.IUserVerifiedStage withUserId(byte[] id)
Description copied from interface: `AssertionResult.IUserIdStage`
Set the user.id.

Specified by:
  `withUserId` in interface `AssertionResult.IUserIdStage`
Parameters:
  `id` - the user.id
Returns:
  the next stage

### withUserVerified

public AssertionResult.IBuildStage withUserVerified(boolean uv)
Set the userVerified flag.

Specified by:
  `withUserVerified` in interface `AssertionResult.IUserVerifiedStage`
Parameters:
  `uv` - the user verified flag
Returns:
  the next stage

### build

public AssertionResult build()
Description copied from interface: `AssertionResult.IBuildStage`
Build the result.

Specified by:
  `build` in interface `AssertionResult.IBuildStage`
Returns:
  an assertion result