Class BasicAuthHelper


  • public class BasicAuthHelper
    extends Object
    Web systems implementing RESTful APIs with basic auth can use this helper class to get credentials from the inbound request.
    • Constructor Detail

      • BasicAuthHelper

        public BasicAuthHelper()
    • Method Detail

      • readUsernamePasswordCredential

        public static UsernamePasswordCredential readUsernamePasswordCredential​(NvReadable settings,
                                                                                HeaderReader hr)
        Build an UsernamePasswordCredential from an inbound HTTP header.
        Parameters:
        settings - a settings source
        hr - a header reader to isolate this code from the web technology
        Returns:
        username password credential or null if the header is malformed, etc.