public class AuthenticationModel extends Object
| Constructor and Description |
|---|
AuthenticationModel(String username,
String password)
instantiates a new instance of the
AuthenticationModel class with no client Id |
AuthenticationModel(String username,
String password,
Optional<String> clientId)
instantiates a new instance of the
AuthenticationModel class ensuring that
username and password are both non-null and non-empty |
| Modifier and Type | Method and Description |
|---|---|
String |
getClientId()
Gets the client id if present; otherwise throws a
NoSuchElementException |
String |
getPassword()
gets the password value
|
String |
getUsername()
Get the username value
|
boolean |
hasClientId()
Returns whether this object contains a clientId or not
|
public AuthenticationModel(String username, String password)
AuthenticationModel class with no client Idpublic String getPassword()
Secretpublic String getUsername()
public boolean hasClientId()
should be called prior to getClientId to ensure a value is present,
otherwise an exception may occur
public String getClientId() throws NoSuchElementException
NoSuchElementExceptionNoSuchElementException - if this instance does not have a clientIdCopyright © 2016–2021. All rights reserved.