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 Jwk
key()
Returns the key to use for signing or encryption.The key to use for encrypting or signing.<T> B
param
(WebCryptoHeader.Param param, T value) Sets a registered parameter value<T> B
Sets a parameter value.protected <T> B
param
(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, keyId
Methods inherited from class edu.iu.client.IuJsonBuilder
build, param, paramNames, toJson
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.iu.crypt.WebCertificateReference.Builder
cert, cert, pem, pem, x5t, x5t256
Methods inherited from interface edu.iu.crypt.WebCryptoHeader.Builder
keyId
-
Constructor Details
-
JoseBuilder
Constructor.- Parameters:
algorithm
- algorithm
-
-
Method Details
-
copy
Description copied from class:IuJsonBuilder
Copies all values from another builder to this one- Overrides:
copy
in classIuJsonBuilder<B extends JoseBuilder<B>>
- Type Parameters:
S
- source builder type- Parameters:
builder
- source builder- Returns:
- this
-
wellKnown
Description copied from interface:WebCryptoHeader.Builder
Sets the URI where JWKS well-known key data can be retrieved.- Specified by:
wellKnown
in interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>
- Parameters:
uri
- JWKSURI
- Returns:
- this
-
wellKnown
Description copied from interface:WebCryptoHeader.Builder
Sets the key to include with the header.- Specified by:
wellKnown
in 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.Builder
The key to use for encrypting or signing.- Specified by:
key
in 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.Builder
Sets the header type parameter value.- Specified by:
type
in interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>
- Parameters:
type
- header type parameter value.- Returns:
- this
-
contentType
Description copied from interface:WebCryptoHeader.Builder
Sets the header content type parameter value.- Specified by:
contentType
in interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>
- Parameters:
contentType
- header type parameter value.- Returns:
- this
-
crit
Description copied from interface:WebCryptoHeader.Builder
Sets critical parameter names.- Specified by:
crit
in interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>
- Parameters:
name
- critical parameter names- Returns:
- this
-
param
Description copied from interface:WebCryptoHeader.Builder
Sets a registered parameter value- Specified by:
param
in interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>
- Type Parameters:
T
- value type- Parameters:
param
- parametervalue
- parameter value- Returns:
- this
-
param
Description copied from class:IuJsonBuilder
Sets a parameter value.- Specified by:
param
in interfaceWebCryptoHeader.Builder<B extends JoseBuilder<B>>
- Overrides:
param
in classIuJsonBuilder<B extends JoseBuilder<B>>
- Type Parameters:
T
- value type- Parameters:
paramName
- parameter namevalue
- parameter value- Returns:
- this
-
param
Description copied from class:IuJsonBuilder
Sets a parameter value.- Overrides:
param
in 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
-