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

# Class WebAuthnManagementContext

java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.plugin.authn.webauthn.context.WebAuthnManagementContext

All Implemented Interfaces:
  `Iterable<BaseContext>`

public class WebAuthnManagementContext extends BaseContext
A WebAuthn admin management context for the management admin flow.

## 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[]`
`credentialIdToRemove`
The ID of a credential that is going to be removed.
`private Collection<EnhancedCredentialRecord>`
`foundCredentials`
The located set of credentials registered for the given searchUsername.
`private String`
`principalName`
Canonical principal name of the authenticated user, acting as an admin.
`private String`
`rawSearchUsername`
The raw username entered by the admin to search for.
`private String`
`searchUsername`
The username of the user to find and manage credentials for.

## Constructor Summary

Constructors
Constructor
Description
`WebAuthnManagementContext()`

## Method Summary

Modifier and Type
Method
Description
`byte[]`
`getCredentialIdToRemove()`
Get the ID of the credential that is going to be removed.
`Collection<EnhancedCredentialRecord>`
`getFoundCredentials()`
Get the credentials found to belong to the given searchUsername.
`String`
`getPrincipalName()`
Get the canonical principal name of the authenticated subject.
`String`
`getRawSearchUsername()`
Gets the raw username entered by the admin to search for.
`String`
`getSearchUsername()`
Get the username of the user to find and manage credentials for.
`WebAuthnManagementContext`
`setCredentialIdToRemove(byte[] id)`
Set the ID of the credential that is going to be removed.
`WebAuthnManagementContext`
`setFoundCredentials(Collection<EnhancedCredentialRecord> credentials)`
Set the credentials found to belong to the given searchUsername.
`WebAuthnManagementContext`
`setPrincipalName(String name)`
Set the canonical principal name of the authenticated subject.
`WebAuthnManagementContext`
`setRawSearchUsername(String name)`
Sets the raw username entered by the admin to search for.
`WebAuthnManagementContext`
`setSearchUsername(String name)`
Set the username of the user to find and manage credentials for.

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

### principalName

@Nullable private String principalName
Canonical principal name of the authenticated user, acting as an admin.

### searchUsername

@Nullable private String searchUsername
The username of the user to find and manage credentials for. This username will likely mutate based on subject canonicalization into the username of the user stored in the credential repository.

### rawSearchUsername

@Nullable private String rawSearchUsername
The raw username entered by the admin to search for. Is not transformed or canonicalized in anyway.

### foundCredentials

@Nullable @Unmodifiable @NotLive private Collection<EnhancedCredentialRecord> foundCredentials
The located set of credentials registered for the given searchUsername.

### credentialIdToRemove

@Nullable private byte[] credentialIdToRemove
The ID of a credential that is going to be removed.

## Constructor Details

### WebAuthnManagementContext

public WebAuthnManagementContext()

## Method Details

### getPrincipalName

@Nullable public String getPrincipalName()
Get the canonical principal name of the authenticated subject.

Returns:
  the canonical principal name

### setPrincipalName

@Nonnull public WebAuthnManagementContext setPrincipalName(@Nullable String name)
Set the canonical principal name of the authenticated subject.

Parameters:
  `name` - the canonical principal name
Returns:
  this context

### getSearchUsername

@Nullable public String getSearchUsername()
Get the username of the user to find and manage credentials for.

Returns:
  the username to search for

### setSearchUsername

@Nonnull public WebAuthnManagementContext setSearchUsername(@Nullable String name)
Set the username of the user to find and manage credentials for.

Parameters:
  `name` - the username to search for
Returns:
  this context

### getRawSearchUsername

@Nullable public String getRawSearchUsername()
Gets the raw username entered by the admin to search for.

Returns:
  the raw username entered by the admin
Since:
  1.1.0

### setRawSearchUsername

@Nonnull public WebAuthnManagementContext setRawSearchUsername(@Nullable String name)
Sets the raw username entered by the admin to search for.

Parameters:
  `name` - the raw username entered by the admin
Returns:
  this context
Since:
  1.1.0

### setFoundCredentials

@Nonnull public WebAuthnManagementContext setFoundCredentials(@Nullable Collection<EnhancedCredentialRecord> credentials)
Set the credentials found to belong to the given searchUsername.

Parameters:
  `credentials` - the set of credentials
Returns:
  this context

### getFoundCredentials

@Nonnull @Unmodifiable @NotLive public Collection<EnhancedCredentialRecord> getFoundCredentials()
Get the credentials found to belong to the given searchUsername.

Returns:
  the credentials.

### setCredentialIdToRemove

@Nonnull public WebAuthnManagementContext setCredentialIdToRemove(@Nullable byte[] id)
Set 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:
  the credential id to remove.