Package net.shibboleth.idp.authn.principal

# Class HOTPPrincipal

java.lang.Object
net.shibboleth.idp.authn.principal.HOTPPrincipal

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

public class HOTPPrincipal extends Object implements CloneablePrincipal
Principal based on an HOTP authentication.

Since:
  4.1.0

## Field Summary

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

## Constructor Summary

Constructors
Constructor
Description
`HOTPPrincipal(String name)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`HOTPPrincipal`
`clone()`
Creates and returns a copy of this object.
`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

### username

@Nonnull @NotEmpty private String username
The username.

## Constructor Details

### HOTPPrincipal

public HOTPPrincipal(@Nonnull @NotEmpty @ParameterName(name="name") String name)
Constructor.

Parameters:
  `name` - the username

## 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 HOTPPrincipal clone() throws CloneNotSupportedException
Creates and returns a copy of this object.

Specified by:
  `clone` in interface `CloneablePrincipal`
Overrides:
  `clone` in class `Object`
Returns:
  a clone of this instance.
Throws:
  `CloneNotSupportedException` - if the instance cannot be cloned.
See Also:
  - `Object.clone()`