@Immutable
public final class LoginInfo
extends Object
Holds login informations: the user identification and its associated password.
Constructor and Description |
---|
LoginInfo(Optional<String> user,
Optional<char[]> password)
Constructs a login info instance.
|
Modifier and Type | Method and Description |
---|---|
Optional<char[]> |
getPassword()
Gets the password.
|
Optional<String> |
getUser()
Gets the user.
|
boolean |
isEnabled()
Asks if this login info is enabled.
|
public LoginInfo(@Nonnull Optional<String> user, @Nonnull Optional<char[]> password)
user
- The user to associate with the session.password
- The password authenticating the user.@Nonnull @CheckReturnValue public Optional<char[]> getPassword()
The password will be empty if and only if the user is empty.
@Nonnull @CheckReturnValue public Optional<String> getUser()
@CheckReturnValue public boolean isEnabled()
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.