Package net.shibboleth.idp.authn.context

# Class UsernameContext

java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.authn.context.UsernameContext

All Implemented Interfaces:
  `Iterable<BaseContext>`

public final class UsernameContext extends BaseContext
Context that carries a username (without a password) to be validated.

Parent:
  `AuthenticationContext`
Added:
  After extracting a username during authentication

## 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 String`
`username`
The username.

## Constructor Summary

Constructors
Constructor
Description
`UsernameContext()`

## Method Summary

Modifier and Type
Method
Description
`String`
`getUsername()`
Gets the username.
`UsernameContext`
`setUsername(String name)`
Sets the username.

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

### username

@Nullable private String username
The username.

## Constructor Details

### UsernameContext

public UsernameContext()

## Method Details

### getUsername

@Nullable public String getUsername()
Gets the username.

Returns:
  the username

### setUsername

@Nonnull public UsernameContext setUsername(@Nullable String name)
Sets the username.

Parameters:
  `name` - the username
Returns:
  this context