Package org.openapitools.client.auth
Class HttpBearerAuth
java.lang.Object
org.openapitools.client.auth.HttpBearerAuth
- All Implemented Interfaces:
Authentication
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-10-22T02:16:26.710079594Z[Etc/UTC]",
comments="Generator version: 7.8.0")
public class HttpBearerAuth
extends Object
implements Authentication
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) Apply authentication settings to header and query params.Gets the token, which together with the scheme, will be sent as the value of the Authorization header.voidsetBearerToken(String bearerToken) Sets the token, which together with the scheme, will be sent as the value of the Authorization header.voidsetBearerToken(Supplier<String> tokenSupplier) Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header.private static StringupperCaseBearer(String scheme)
-
Field Details
-
scheme
-
tokenSupplier
-
-
Constructor Details
-
HttpBearerAuth
-
-
Method Details
-
getBearerToken
Gets the token, which together with the scheme, will be sent as the value of the Authorization header.- Returns:
- The bearer token
-
setBearerToken
Sets the token, which together with the scheme, will be sent as the value of the Authorization header.- Parameters:
bearerToken- The bearer token to send in the Authorization header
-
setBearerToken
Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header.- Parameters:
tokenSupplier- The supplier of bearer tokens to send in the Authorization header
-
applyToParams
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, throws ApiExceptionString> cookieParams, String payload, String method, URI uri) Description copied from interface:AuthenticationApply authentication settings to header and query params.- Specified by:
applyToParamsin interfaceAuthentication- Parameters:
queryParams- List of query parametersheaderParams- Map of header parameterscookieParams- Map of cookie parameterspayload- HTTP request bodymethod- HTTP methoduri- URI- Throws:
ApiException- if failed to update the parameters
-
upperCaseBearer
-