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

# Class WebAuthnUserIdPrinicpal

java.lang.Object
net.shibboleth.idp.plugin.authn.webauthn.principal.WebAuthnUserIdPrinicpal

All Implemented Interfaces:
  `Cloneable`, `Principal`, `CloneablePrincipal`

public class WebAuthnUserIdPrinicpal extends Object implements CloneablePrincipal
Principal based on the WebAuthn user.id base64 encoded.

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`userIdBase64Encoded`
The username.

## Constructor Summary

Constructors
Constructor
Description
`WebAuthnUserIdPrinicpal(byte[] id)`
Constructor.
`WebAuthnUserIdPrinicpal(String idBase64)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`WebAuthnUserIdPrinicpal`
`clone()`
`boolean`
`equals(Object other)`
`String`
`getName()`
`int`
`hashCode()`
`String`
`toString()`

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

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.security.Principal

`implies`

## Field Details

### userIdBase64Encoded

@Nonnull @NotEmpty private String userIdBase64Encoded
The username.

## Constructor Details

### WebAuthnUserIdPrinicpal

public WebAuthnUserIdPrinicpal(@Nonnull @NotEmpty @ParameterName(name="userId") byte[] id)
Constructor.

Parameters:
  `id` - the user.id as raw bytes

### WebAuthnUserIdPrinicpal

public WebAuthnUserIdPrinicpal(@Nonnull @NotEmpty @ParameterName(name="userId") String idBase64)
Constructor.

Parameters:
  `idBase64` - the user.id base64 encoded

## Method Details

### getName

@Nonnull @NotEmpty public String getName()

Specified by:
  `getName` in interface `Principal`

### hashCode

public int hashCode()

Specified by:
  `hashCode` in interface `Principal`
Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object other)

Specified by:
  `equals` in interface `Principal`
Overrides:
  `equals` in class `Object`

### toString

public String toString()

Specified by:
  `toString` in interface `Principal`
Overrides:
  `toString` in class `Object`

### clone

@Nonnull public WebAuthnUserIdPrinicpal clone() throws CloneNotSupportedException

Specified by:
  `clone` in interface `CloneablePrincipal`
Overrides:
  `clone` in class `Object`
Throws:
  `CloneNotSupportedException`