java.lang.Object
edu.iu.client.IuJsonBuilder<B>
iu.crypt.CertificateReferenceBuilder<B>
iu.crypt.KeyReferenceBuilder<B>
iu.crypt.JoseBuilder<B>
- Type Parameters:
B- builder type
- All Implemented Interfaces:
WebCertificateReference.Builder<B>,WebCryptoHeader.Builder<B>,WebKeyReference.Builder<B>
- Direct Known Subclasses:
JweRecipientBuilder,JweRecipientBuilder.EncryptedKeyBuilder
class JoseBuilder<B extends JoseBuilder<B>>
extends KeyReferenceBuilder<B>
implements WebCryptoHeader.Builder<B>
Builds a web signature or encryption header.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontentType(String contentType) Sets the header content type parameter value.protected <S extends IuJsonBuilder<S>>
Bcopy(S builder) Copies all values from another builder to this oneSets critical parameter names.protected Jwkkey()Returns the key to use for signing or encryption.The key to use for encrypting or signing.<T> Bparam(WebCryptoHeader.Param param, T value) Sets a registered parameter value<T> BSets a parameter value.protected <T> Bparam(String name, T value, IuJsonAdapter<T> adapter) Sets a parameter value.Sets the header type parameter value.Sets the key to include with the header.Sets the URI where JWKS well-known key data can be retrieved.Methods inherited from class iu.crypt.KeyReferenceBuilder
algorithm, keyIdMethods inherited from class edu.iu.client.IuJsonBuilder
build, param, paramNames, toJsonMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.iu.crypt.WebCertificateReference.Builder
cert, cert, pem, pem, x5t, x5t256Methods inherited from interface edu.iu.crypt.WebCryptoHeader.Builder
keyId
-
Constructor Details
-
JoseBuilder
Constructor.- Parameters:
algorithm- algorithm
-
-
Method Details
-
copy
Description copied from class:IuJsonBuilderCopies all values from another builder to this one- Overrides:
copyin classIuJsonBuilder<B extends JoseBuilder<B>>- Type Parameters:
S- source builder type- Parameters:
builder- source builder- Returns:
- this
-
wellKnown
Description copied from interface:WebCryptoHeader.BuilderSets the URI where JWKS well-known key data can be retrieved.- Specified by:
wellKnownin interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>- Parameters:
uri- JWKSURI- Returns:
- this
-
wellKnown
Description copied from interface:WebCryptoHeader.BuilderSets the key to include with the header.- Specified by:
wellKnownin interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>- Parameters:
key- may include private/secret key data to use for encryption/signing; onlyWebKey.wellKnown()will be included in the header.- Returns:
- this
-
key
Description copied from interface:WebCryptoHeader.BuilderThe key to use for encrypting or signing.- Specified by:
keyin interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>- Parameters:
key- key to use for encryption or signing; will not be included in the header. UseWebCryptoHeader.Builder.wellKnown(WebKey)to set the key and include well-known component in the header.- Returns:
- this
-
type
Description copied from interface:WebCryptoHeader.BuilderSets the header type parameter value.- Specified by:
typein interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>- Parameters:
type- header type parameter value.- Returns:
- this
-
contentType
Description copied from interface:WebCryptoHeader.BuilderSets the header content type parameter value.- Specified by:
contentTypein interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>- Parameters:
contentType- header type parameter value.- Returns:
- this
-
crit
Description copied from interface:WebCryptoHeader.BuilderSets critical parameter names.- Specified by:
critin interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>- Parameters:
name- critical parameter names- Returns:
- this
-
param
Description copied from interface:WebCryptoHeader.BuilderSets a registered parameter value- Specified by:
paramin interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>- Type Parameters:
T- value type- Parameters:
param- parametervalue- parameter value- Returns:
- this
-
param
Description copied from class:IuJsonBuilderSets a parameter value.- Specified by:
paramin interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>- Overrides:
paramin classIuJsonBuilder<B extends JoseBuilder<B>>- Type Parameters:
T- value type- Parameters:
paramName- parameter namevalue- parameter value- Returns:
- this
-
param
Description copied from class:IuJsonBuilderSets a parameter value.- Overrides:
paramin classIuJsonBuilder<B extends JoseBuilder<B>>- Type Parameters:
T- value type- Parameters:
name- parameter namevalue- parameter valueadapter- JSON type adapter- Returns:
- this
-
key
Returns the key to use for signing or encryption.- Returns:
- signing/encryption key
-