Class ApiKeyAuthHelper


  • public class ApiKeyAuthHelper
    extends Object
    Web systems implementing RESTful APIs with API keys can use this helper class to read API key authentication info from the inbound request.
    • Constructor Detail

      • ApiKeyAuthHelper

        public ApiKeyAuthHelper()
    • Method Detail

      • readApiKeyCredential

        public static ApiKeyCredential readApiKeyCredential​(NvReadable settings,
                                                            HeaderReader hr,
                                                            String serviceName)
        Build an ApiKeyCredential from an inbound HTTP header.
        Parameters:
        settings - a settings source
        hr - a header reader, to isolate web server tech from this class
        serviceName - the name of the service fpr signed content
        Returns:
        an API key credential, or null if the header is malformed, etc.