public class BearerAuthManager extends Object implements AuthManager, BearerAuthCredentials
| Constructor and Description |
|---|
BearerAuthManager(String accessToken)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
HttpRequest |
apply(HttpRequest httpRequest)
Adds authentication to the given HttpRequest.
|
CompletableFuture<HttpRequest> |
applyAsync(HttpRequest httpRequest)
Asynchronously adds authentication to the given HttpRequest.
|
boolean |
equals(String accessToken)
Checks if provided credentials matched with existing ones.
|
String |
getAccessToken()
String value for accessToken.
|
String |
toString()
Converts this BearerAuthManager into string format.
|
public BearerAuthManager(String accessToken)
accessToken - String value for accessToken.public String getAccessToken()
getAccessToken in interface BearerAuthCredentialspublic boolean equals(String accessToken)
equals in interface BearerAuthCredentialsaccessToken - String value for credentials.public String toString()
public HttpRequest apply(HttpRequest httpRequest)
apply in interface AuthManagerhttpRequest - HttpRequest object for authenticationpublic CompletableFuture<HttpRequest> applyAsync(HttpRequest httpRequest)
applyAsync in interface AuthManagerhttpRequest - HttpRequest object for authenticationCopyright © 2022. All rights reserved.