Class JcaHttpAuthBuilder


  • public class JcaHttpAuthBuilder
    extends java.lang.Object
    Builder for HttpAuth operator that handles digest auth using a JCA provider.
    • Constructor Summary

      Constructors 
      Constructor Description
      JcaHttpAuthBuilder​(java.lang.String username, char[] password)
      Base constructor for digest auth.
      JcaHttpAuthBuilder​(java.lang.String realm, java.lang.String username, char[] password)
      Base constructor for digest auth with an expected realm.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      HttpAuth build()
      Return a HttpAuth implementing digest auth for the user, password, and realm combination.
      JcaHttpAuthBuilder setNonceGenerator​(java.security.SecureRandom random)
      Set the SecureRandom to be used as a source of nonces.
      JcaHttpAuthBuilder setProvider​(java.lang.String providerName)
      Set the provider to use to provide the needed message digests.
      JcaHttpAuthBuilder setProvider​(java.security.Provider provider)
      Set the provider to use to provide the needed message digests.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JcaHttpAuthBuilder

        public JcaHttpAuthBuilder​(java.lang.String username,
                                  char[] password)
        Base constructor for digest auth.
        Parameters:
        username - user id.
        password - user's password.
      • JcaHttpAuthBuilder

        public JcaHttpAuthBuilder​(java.lang.String realm,
                                  java.lang.String username,
                                  char[] password)
        Base constructor for digest auth with an expected realm.
        Parameters:
        realm - expected server realm.
        username - user id.
        password - user's password.
    • Method Detail

      • setProvider

        public JcaHttpAuthBuilder setProvider​(java.security.Provider provider)
        Set the provider to use to provide the needed message digests.
        Parameters:
        provider - provider to use.
        Returns:
        this builder instance.
      • setProvider

        public JcaHttpAuthBuilder setProvider​(java.lang.String providerName)
        Set the provider to use to provide the needed message digests.
        Parameters:
        providerName - the name provider to use.
        Returns:
        this builder instance.
      • setNonceGenerator

        public JcaHttpAuthBuilder setNonceGenerator​(java.security.SecureRandom random)
        Set the SecureRandom to be used as a source of nonces.
        Parameters:
        random - the secure random to use as a nonce generator.
        Returns:
        this builder instance.