Class HttpAuth

  • All Implemented Interfaces:
    ESTAuth

    public class HttpAuth
    extends Object
    implements ESTAuth
    Provides stock implementations for basic auth and digest auth.
    • Constructor Detail

      • HttpAuth

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

        public HttpAuth​(String realm,
                        String username,
                        char[] password)
        Constructor for basic auth with a specified realm.
        Parameters:
        realm - expected server realm.
        username - user id.
        password - user's password.
      • HttpAuth

        public HttpAuth​(String username,
                        char[] password,
                        SecureRandom nonceGenerator,
                        DigestCalculatorProvider digestCalculatorProvider)
        Base constructor for digest auth. The realm will be set by
        Parameters:
        username - user id.
        password - user's password.
        nonceGenerator - random source for generating nonces.
        digestCalculatorProvider - provider for digest calculators needed for calculating hashes.
      • HttpAuth

        public HttpAuth​(String realm,
                        String username,
                        char[] password,
                        SecureRandom nonceGenerator,
                        DigestCalculatorProvider digestCalculatorProvider)
        Constructor for digest auth with a specified realm.
        Parameters:
        realm - expected server realm.
        username - user id.
        password - user's password.
        nonceGenerator - random source for generating nonces.
        digestCalculatorProvider - provider for digest calculators needed for calculating hashes.
    • Method Detail

      • applyAuth

        public void applyAuth​(ESTRequestBuilder reqBldr)
        Description copied from interface: ESTAuth
        Add the Auth attributes to the passed in request builder.
        Specified by:
        applyAuth in interface ESTAuth
        Parameters:
        reqBldr - the builder for the request needing the Auth attributes.