Package org.bouncycastle.est.jcajce
Class JcaHttpAuthBuilder
java.lang.Object
org.bouncycastle.est.jcajce.JcaHttpAuthBuilder
Builder for HttpAuth operator that handles digest auth using a JCA provider.
-
Constructor Summary
ConstructorDescriptionJcaHttpAuthBuilder
(String username, char[] password) Base constructor for digest auth.JcaHttpAuthBuilder
(String realm, String username, char[] password) Base constructor for digest auth with an expected realm. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Return a HttpAuth implementing digest auth for the user, password, and realm combination.setNonceGenerator
(SecureRandom random) Set the SecureRandom to be used as a source of nonces.setProvider
(String providerName) Set the provider to use to provide the needed message digests.setProvider
(Provider provider) Set the provider to use to provide the needed message digests.
-
Constructor Details
-
JcaHttpAuthBuilder
Base constructor for digest auth.- Parameters:
username
- user id.password
- user's password.
-
JcaHttpAuthBuilder
Base constructor for digest auth with an expected realm.- Parameters:
realm
- expected server realm.username
- user id.password
- user's password.
-
-
Method Details
-
setProvider
Set the provider to use to provide the needed message digests.- Parameters:
provider
- provider to use.- Returns:
- this builder instance.
-
setProvider
Set the provider to use to provide the needed message digests.- Parameters:
providerName
- the name provider to use.- Returns:
- this builder instance.
-
setNonceGenerator
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.
-
build
Return a HttpAuth implementing digest auth for the user, password, and realm combination.- Returns:
- a HttpAuth object.
- Throws:
OperatorCreationException
- if there is an issue setting up access to digest operators.
-