Class APIKeyHandler

    • Constructor Detail

      • APIKeyHandler

        public APIKeyHandler​(APIKeyHandler delegate)
      • APIKeyHandler

        public APIKeyHandler​(Object delegate)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • create

        public static APIKeyHandler create​(AuthenticationProvider authProvider)
        Create an API Key authentication handler
        Parameters:
        authProvider - the auth provider to use
        Returns:
        the auth handler
      • header

        public APIKeyHandler header​(String headerName)
        Specify the source for the api key extraction as an HTTP header with the given name.
        Parameters:
        headerName - the header name containing the API key
        Returns:
        fluent self
      • parameter

        public APIKeyHandler parameter​(String paramName)
        Specify the source for the api key extraction as an HTTP query parameter with the given name.
        Parameters:
        paramName - the parameter name containing the API key
        Returns:
        fluent self
      • cookie

        public APIKeyHandler cookie​(String cookieName)
        Specify the source for the api key extraction as an HTTP cookie with the given name.
        Parameters:
        cookieName - the cookie name containing the API key
        Returns:
        fluent self
      • tokenExtractor

        public APIKeyHandler tokenExtractor​(Function<String,​Future<String>> tokenExtractor)
        Transform from user's token format to the AuthenticationHandler's format.
        Parameters:
        tokenExtractor - extract the token from the origin payload
        Returns:
        fluent self
      • tokenExtractor

        public APIKeyHandler tokenExtractor​(io.reactivex.functions.Function<String,​io.reactivex.Single<String>> tokenExtractor)
        Transform from user's token format to the AuthenticationHandler's format.
        Parameters:
        tokenExtractor - extract the token from the origin payload
        Returns:
        fluent self