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

# Class RegistrationResult.Builder

java.lang.Object
net.shibboleth.idp.plugin.authn.webauthn.admin.RegistrationResult.Builder

All Implemented Interfaces:
  `RegistrationResult.IAttestationTrustedStage`, `RegistrationResult.IAttestationTypeStage`, `RegistrationResult.IBuildStage`, `RegistrationResult.ICredentialStage`

Enclosing class:
  RegistrationResult

public static final class RegistrationResult.Builder extends Object implements RegistrationResult.IAttestationTrustedStage, RegistrationResult.IAttestationTypeStage, RegistrationResult.ICredentialStage, RegistrationResult.IBuildStage
Builder.

## Field Summary

Fields
Modifier and Type
Field
Description
`private boolean`
`attestationTrusted`
Is the attestation signature valid.
`private com.yubico.webauthn.data.AttestationType`
`attestationType`
The attestation type that was used for this credential.
`private com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAttestationResponse,com.yubico.webauthn.data.ClientRegistrationExtensionOutputs>`
`credential`
The verified attestation response.

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`RegistrationResult`
`build()`
Build a registration result.
`RegistrationResult.IAttestationTypeStage`
`withAttestationTrusted(boolean attTrusted)`
Is the attestation signature valid.
`RegistrationResult.ICredentialStage`
`withAttestationType(com.yubico.webauthn.data.AttestationType attType)`
Set the attestation type.
`RegistrationResult.IBuildStage`
`withCredential(com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAttestationResponse,com.yubico.webauthn.data.ClientRegistrationExtensionOutputs> cred)`
Set the public key credential attestation response.

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

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

## Field Details

### attestationTrusted

private boolean attestationTrusted
Is the attestation signature valid. Does it link to a trusted root attestation.

Note, this is different than if the assertion signature is valid.

### attestationType

@Nonnull private com.yubico.webauthn.data.AttestationType attestationType
The attestation type that was used for this credential. This only applies to attestation statements iff requested.

### credential

@Nonnull private com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAttestationResponse,com.yubico.webauthn.data.ClientRegistrationExtensionOutputs> credential
The verified attestation response.

## Constructor Details

### Builder

private Builder()
Constructor.

## Method Details

### withAttestationTrusted

public RegistrationResult.IAttestationTypeStage withAttestationTrusted(boolean attTrusted)
Description copied from interface: `RegistrationResult.IAttestationTrustedStage`
Is the attestation signature valid. Does it link to a trusted root attestation?

Specified by:
  `withAttestationTrusted` in interface `RegistrationResult.IAttestationTrustedStage`
Parameters:
  `attTrusted` - is the attestation trusted.
Returns:
  this builder

### withAttestationType

public RegistrationResult.ICredentialStage withAttestationType(@Nonnull com.yubico.webauthn.data.AttestationType attType)
Description copied from interface: `RegistrationResult.IAttestationTypeStage`
Set the attestation type.

Specified by:
  `withAttestationType` in interface `RegistrationResult.IAttestationTypeStage`
Parameters:
  `attType` - the attestation type
Returns:
  this builder

### withCredential

public RegistrationResult.IBuildStage withCredential(@Nonnull com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAttestationResponse,com.yubico.webauthn.data.ClientRegistrationExtensionOutputs> cred)
Description copied from interface: `RegistrationResult.ICredentialStage`
Set the public key credential attestation response.

Specified by:
  `withCredential` in interface `RegistrationResult.ICredentialStage`
Parameters:
  `cred` - the attestation response
Returns:
  this builder

### build

public RegistrationResult build()
Description copied from interface: `RegistrationResult.IBuildStage`
Build a registration result.

Specified by:
  `build` in interface `RegistrationResult.IBuildStage`
Returns:
  the result