public class UsernamePasswordCredentials extends Object implements Credentials
AuthenticationProvider
that requires tokens, for example JWT, Oauth2, OpenId ConnectModifier | Constructor and Description |
---|---|
protected |
UsernamePasswordCredentials() |
|
UsernamePasswordCredentials(JsonObject jsonObject) |
|
UsernamePasswordCredentials(String username,
String password) |
Modifier and Type | Method and Description |
---|---|
<V> void |
checkValid(V arg)
Implementors should override this method to perform validation.
|
String |
getPassword() |
String |
getUsername() |
UsernamePasswordCredentials |
setPassword(String password) |
UsernamePasswordCredentials |
setUsername(String username) |
JsonObject |
toJson()
Simple interop to downcast back to JSON for backwards compatibility.
|
String |
toString() |
protected UsernamePasswordCredentials()
public UsernamePasswordCredentials(JsonObject jsonObject)
public String getPassword()
public String getUsername()
public UsernamePasswordCredentials setPassword(String password)
public UsernamePasswordCredentials setUsername(String username)
public <V> void checkValid(V arg) throws CredentialValidationException
Credentials
checkValid
in interface Credentials
V
- the generic type of the argumentarg
- optional argument or null.CredentialValidationException
- when the validation failspublic JsonObject toJson()
Credentials
toJson
in interface Credentials
Copyright © 2020 Eclipse. All rights reserved.