@ProviderType
public interface JwsBuilder
JwsBuilder
provides a simple API to issue JWS formatted token
as defined in http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-16
and http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-21Modifier and Type | Method and Description |
---|---|
java.lang.String |
build() |
JwsBuilder |
setAudience(java.lang.String aud)
Set the (Audience) Claim as for http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-16#section-4.1.3
|
JwsBuilder |
setCustomClaimsSetField(java.lang.String key,
java.lang.Object value)
Set a custom claim field
|
JwsBuilder |
setExpiresIn(long expiresIn)
Set the expiration time for the token expressed in seconds
|
JwsBuilder |
setIssuedAt(long iat)
Set the (Issued At) Claim as for https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-25#section-4.1.6
If the set Issued At is too far away in the future (20 seconds or more than current time) the set Issued At
will be ignored and the current time is used instead to build the JWT
|
JwsBuilder |
setIssuer(java.lang.String iss)
Set the (Issuer) Claim as for http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-16#section-4.1.1
|
JwsBuilder |
setScope(java.lang.String scope)
Set the scope associate with the token
|
JwsBuilder |
setSubject(java.lang.String sub)
Set the (Subject) Claim as for http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-16#section-4.1.2
|
java.lang.String build() throws CryptoException
CryptoException
- if any problem occurs signing the tokenJwsBuilder setIssuer(java.lang.String iss)
iss
- The (Issuer) ClaimJwsBuilder setSubject(java.lang.String sub)
sub
- The (Subject) Claim asJwsBuilder setAudience(java.lang.String aud)
aud
- The (Audience) ClaimJwsBuilder setExpiresIn(long expiresIn)
expiresIn
- The expiration time for the token expressed in secondsJwsBuilder setScope(java.lang.String scope)
scope
- The scope associate with the tokenJwsBuilder setCustomClaimsSetField(java.lang.String key, java.lang.Object value)
key
- The claim field custom namevalue
- The claim field valueJwsBuilder setIssuedAt(long iat)
iat
- The (Issued At) Claim expressed in secondsCopyright © 2010 - 2020 Adobe. All Rights Reserved