public class TokenCredentials extends Object implements Credentials
AuthenticationProvider
that requires Tokens, such as OAuth2 or JWT
to perform its authenticationModifier | Constructor and Description |
---|---|
protected |
TokenCredentials() |
|
TokenCredentials(JsonObject jsonObject) |
|
TokenCredentials(String token) |
Modifier and Type | Method and Description |
---|---|
<V> void |
checkValid(V arg)
Implementors should override this method to perform validation.
|
String |
getToken() |
TokenCredentials |
setToken(String token) |
JsonObject |
toJson()
Simple interop to downcast back to JSON for backwards compatibility.
|
String |
toString() |
protected TokenCredentials()
public TokenCredentials(String token)
public TokenCredentials(JsonObject jsonObject)
public String getToken()
public TokenCredentials setToken(String token)
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.