Package org.bouncycastle.est
Class HttpAuth
java.lang.Object
org.bouncycastle.est.HttpAuth
- All Implemented Interfaces:
ESTAuth
Provides stock implementations for basic auth and digest auth.
-
Constructor Summary
ConstructorDescriptionBase constructor for basic auth.HttpAuth
(String username, char[] password, SecureRandom nonceGenerator, DigestCalculatorProvider digestCalculatorProvider) Base constructor for digest auth.Constructor for basic auth with a specified realm.HttpAuth
(String realm, String username, char[] password, SecureRandom nonceGenerator, DigestCalculatorProvider digestCalculatorProvider) Constructor for digest auth with a specified realm. -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyAuth
(ESTRequestBuilder reqBldr) Add the Auth attributes to the passed in request builder.
-
Constructor Details
-
HttpAuth
Base constructor for basic auth.- Parameters:
username
- user id.password
- user's password.
-
HttpAuth
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 Details