Class HttpDigestAuthProvider.Builder

    • Field Detail

      • DEFAULT_DIGEST_NONCE_TIMEOUT

        public static final long DEFAULT_DIGEST_NONCE_TIMEOUT
        Default is 24 hours.
        See Also:
        Constant Field Values
    • Method Detail

      • config

        public HttpDigestAuthProvider.Builder config​(Config config)
        Update builder from configuration.
        Parameters:
        config - to read configuration from, located on the node of the provider
        Returns:
        updated builder instance
      • subjectType

        public HttpDigestAuthProvider.Builder subjectType​(SubjectType subjectType)
        Principal type this provider extracts (and also propagates).
        Parameters:
        subjectType - type of principal
        Returns:
        updated builder instance
      • optional

        public HttpDigestAuthProvider.Builder optional​(boolean optional)
        Whether authentication is required. By default, request will fail if the authentication cannot be verified. If set to false, request will process and this provider will abstain.
        Parameters:
        optional - whether authentication is optional (true) or required (false)
        Returns:
        updated builder instance
      • realm

        public HttpDigestAuthProvider.Builder realm​(String realm)
        Set the realm to use when challenging users.
        Parameters:
        realm - security realm name to send to browser (or any other client) when unauthenticated
        Returns:
        updated builder instance
      • digestServerSecret

        public HttpDigestAuthProvider.Builder digestServerSecret​(char[] serverSecret)
        The nonce is encrypted using this secret - to make sure the nonce we get back was generated by us and to make sure we can safely time-out nonce values. This secret must be the same for all service instances (or all services that want to share the same authentication). Defaults to a random password - e.g. if deployed to multiple servers, the authentication WILL NOT WORK. You MUST provide your own password to work in a distributed environment with non-sticky load balancing.
        Parameters:
        serverSecret - a password to encrypt our nonce values with
        Returns:
        updated builder instance
      • noDigestQop

        public HttpDigestAuthProvider.Builder noDigestQop()
        Do not use qop in challenge (will fallback to legacy RFC-2069 instead of RFC-2617.
        Returns:
        updated builder instance