Class HttpBearerAuth
- java.lang.Object
-
- de.xima.fc.api.rest.pub.client.user.auth.HttpBearerAuth
-
- All Implemented Interfaces:
Authentication
@Generated("de.xima.openapi.codegen.java_jaxrs.XimaJavaJaxrsGenerator") public final class HttpBearerAuth extends Object implements AuthenticationAn authentication that uses a given bearer token for authentication.
-
-
Constructor Summary
Constructors Constructor Description HttpBearerAuth(String scheme, String bearerToken)Creates a new authentication that uses the given bearer token for authentication.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyToParams(ApiCall<?> call)Apply authentication settings to header and query params.StringbearerToken()Gets the token, which together with the scheme, will be sent as the value of the Authorization header.HttpBearerAuthwithBearerToken(String bearerToken)
-
-
-
Constructor Detail
-
HttpBearerAuth
public HttpBearerAuth(String scheme, String bearerToken)
Creates a new authentication that uses the given bearer token for authentication.- Parameters:
scheme- Optional scheme that gets prepended before the bearer token.bearerToken- The token, which together with the scheme, will be sent as the value of the Authorization header.
-
-
Method Detail
-
bearerToken
public String bearerToken()
Gets the token, which together with the scheme, will be sent as the value of the Authorization header.- Returns:
- The bearer token
-
applyToParams
public void applyToParams(ApiCall<?> call)
Description copied from interface:AuthenticationApply authentication settings to header and query params.- Specified by:
applyToParamsin interfaceAuthentication- Parameters:
call- API call with all parameters that can be modified.
-
withBearerToken
public HttpBearerAuth withBearerToken(String bearerToken)
- Parameters:
bearerToken- The bearer token sent together with the scheme in the Authorization header.- Returns:
- A new immutable instance with the new data.
-
-