Class ApiKeyAuth

  • All Implemented Interfaces:
    Authentication

    @Generated("de.xima.openapi.codegen.java_jaxrs.XimaJavaJaxrsGenerator")
    public final class ApiKeyAuth
    extends Object
    implements Authentication
    An authentication that uses a given API key for authentication.
    • Constructor Detail

      • ApiKeyAuth

        public ApiKeyAuth​(String location,
                          String paramName,
                          String apiKey,
                          String apiKeyPrefix)
        A new authentication that uses the given API key for authentication.
        Parameters:
        location - How to send the token, one of query, header, or cookie.
        paramName - The name of the query, header, or cookie parameter with the API key.
        apiKey - API key to send.
        apiKeyPrefix - Prefix of the API key to send.
    • Method Detail

      • location

        public String location()
        Returns:
        location How to send the token, one of query, header, or cookie.
      • paramName

        public String paramName()
        Returns:
        paramName The name of the query, header, or cookie parameter with the API key.
      • apiKey

        public String apiKey()
        Returns:
        apiKey API key to send.
      • apiKeyPrefix

        public String apiKeyPrefix()
        Returns:
        apiKey Prefix of the API key to send.
      • withApiKey

        public ApiKeyAuth withApiKey​(String apiKey)
        Parameters:
        apiKey - The API key to use for authentication.
        Returns:
        A new immutable instance with the new data.
      • withApiKeyPrefix

        public ApiKeyAuth withApiKeyPrefix​(String apiKeyPrefix)
        Parameters:
        apiKeyPrefix - The prefix for the API key to use for authentication.
        Returns:
        A new immutable instance with the new data.
      • 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.