Class HttpBearerAuth

  • All Implemented Interfaces:
    Authentication

    @Generated("de.xima.openapi.codegen.java_jaxrs.XimaJavaJaxrsGenerator")
    public final class HttpBearerAuth
    extends Object
    implements Authentication
    An authentication that uses a given bearer token for authentication.
    • 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: Authentication
        Apply authentication settings to header and query params.
        Specified by:
        applyToParams in interface Authentication
        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.