public interface AuthorizationBuilder
Authorization header value that contains an ASAP token.| Modifier and Type | Method and Description |
|---|---|
AuthorizationBuilder |
audience(Iterable<String> audience)
Specifies the intended audience(s) for the token.
|
default AuthorizationBuilder |
audience(String... audience)
Specifies the intended audience(s) for the token.
|
String |
build()
Generates a signed token and forms a value that is appropriate to use as an "Authorization" HTTP header.
|
AuthorizationBuilder |
customClaims(Optional<javax.json.JsonObject> claims)
Permits the inclusion of additional parameters that are not covered by any of the standard JWT claims.
|
AuthorizationBuilder |
expiration(Optional<Duration> duration)
Specifies how long the token will remain valid.
|
AuthorizationBuilder |
subject(Optional<String> subject)
Specifies the subject of the token.
|
AuthorizationBuilder subject(Optional<String> subject)
subject - the subject to specify, or empty() to omit this field from the tokenthisdefault AuthorizationBuilder audience(String... audience)
audience - the audience(s) to specify in the tokenthisAuthorizationBuilder audience(Iterable<String> audience)
audience - the audience(s) to specify in the tokenthisAuthorizationBuilder expiration(Optional<Duration> duration)
duration - how long the token should remain valid (empty() to use the default)thisAuthorizationBuilder customClaims(Optional<javax.json.JsonObject> claims)
Other than the requirement that it must be expressible in JSON, no other explicit restrictions are given for the contents of this field. Practical restrictions, such as any maximum size for this information or what the consequences might be for exceeding it, are left unspecified.
claims - the additional information, if any, to include as extended information in the tokenthisString build() throws InvalidTokenException, CannotRetrieveKeyException
Authorization header in HTTP requestsCannotRetrieveKeyException - the private key cannot be loadedInvalidTokenException - the parameters supplied for the token were invalidCopyright © 2017 Atlassian. All rights reserved.