| Modifier and Type | Method and Description |
|---|---|
Jwt.Builder |
addHeaderClaim(String claim,
Object value)
Add a generic header claim.
|
Jwt.Builder |
addPayloadClaim(String claim,
Object value)
Add a generic payload claim.
|
Jwt.Builder |
address(JwtUtil.Address address)
Address of the subject.
|
Jwt.Builder |
addScope(String scope)
OAuth2 scope claim to add.
|
Jwt.Builder |
addUserGroup(String group)
A user group claim to add.
|
Jwt.Builder |
algorithm(String algorithm)
The "alg" claim is used to define the signature algorithm.
|
Jwt.Builder |
atHash(byte[] atHash)
Access Token hash value.
|
Jwt.Builder |
audience(String audience)
Audience identifies the expected recipients of this JWT (optional).
|
Jwt.Builder |
birthday(LocalDate birthday)
Birthday of the subject.
|
Jwt |
build()
Build and instance of the
Jwt. |
Jwt.Builder |
cHash(byte[] cHash)
Code hash value.
|
Jwt.Builder |
contentType(String contentType)
This header claim should only be used when nesting or encrypting JWT.
|
Jwt.Builder |
email(String email)
Email claim.
|
Jwt.Builder |
emailVerified(Boolean emailVerified)
Claim defining whether e-mail is verified or not.
|
Jwt.Builder |
expirationTime(Instant expirationTime)
The expiration time defines the time that this JWT loses validity.
|
Jwt.Builder |
familyName(String familyName)
Family name of subject (surname).
|
Jwt.Builder |
fullName(String fullName)
Full name of subject.
|
Jwt.Builder |
gender(String gender)
Gender of the subject.
|
Jwt.Builder |
givenName(String givenName)
Given name of subject (first name).
|
Jwt.Builder |
issuer(String issuer)
The issuer claim identifies the principal that issued the JWT.
|
Jwt.Builder |
issueTime(Instant issueTime)
The issue time defines the time that this JWT was issued.
|
Jwt.Builder |
jwtId(String jwtId)
A unique identifier of this JWT (optional) - must be unique across issuers.
|
Jwt.Builder |
keyId(String keyId)
Key id to be used to sign/verify this JWT.
|
Jwt.Builder |
locale(Locale locale)
Locale of the subject.
|
Jwt.Builder |
middleName(String middleName)
Middle name of subject.
|
Jwt.Builder |
nickname(String nickname)
Nickname of the subject.
|
Jwt.Builder |
nonce(String nonce)
Nonce value is used to prevent replay attacks and must be returned if it was sent in authentication request.
|
Jwt.Builder |
notBefore(Instant notBefore)
The not before time defines the time that this JWT starts being valid.
|
Jwt.Builder |
phoneNumber(String phoneNumber)
Phone number of the subject.
|
Jwt.Builder |
phoneNumberVerified(Boolean phoneNumberVerified)
Whether the phone number is verified or not.
|
Jwt.Builder |
picture(URI picture)
Profile picture URI of the subject.
|
Jwt.Builder |
preferredUsername(String preferredUsername)
Preferred username of the subject.
|
Jwt.Builder |
profile(URI profile)
Profile URI of the subject.
|
Jwt.Builder |
removePayloadClaim(String name)
Remove a payload claim by its name.
|
Jwt.Builder |
scopes(List<String> scopes)
OAuth2 scope claims to set.
|
Jwt.Builder |
subject(String subject)
Subject defines the principal this JWT was issued for (e.g.
|
Jwt.Builder |
timeZone(ZoneId timeZone)
Time zone of the subject.
|
Jwt.Builder |
type(String type)
Type of this JWT.
|
Jwt.Builder |
updatedAt(Instant updatedAt)
Last time the subject's record was updated.
|
Jwt.Builder |
userPrincipal(String principal)
User principal claim as defined by Microprofile JWT Auth spec.
|
Jwt.Builder |
website(URI website)
Website URI of the subject.
|
public Jwt.Builder keyId(String keyId)
keyId - key id (pointing to a JWK)public Jwt.Builder type(String type)
type - type definition (JWT, JWE)public Jwt.Builder scopes(List<String> scopes)
scopes - scope claims to add to a JWTpublic Jwt.Builder addScope(String scope)
scope - scope claim to add to a JWTpublic Jwt.Builder addUserGroup(String group)
group - group name to add to the list of groupspublic Jwt.Builder contentType(String contentType)
contentType - content type to use, use "JWT" if nestedpublic Jwt.Builder addHeaderClaim(String claim, Object value)
claim - claim to addvalue - value of the header claimpublic Jwt.Builder addPayloadClaim(String claim, Object value)
claim - claim to addvalue - value of the payload claimpublic Jwt.Builder algorithm(String algorithm)
algorithm - algorithm to use, Jwk.ALG_NONE for nonepublic Jwt.Builder issuer(String issuer)
issuer - issuer name or URLpublic Jwt.Builder expirationTime(Instant expirationTime)
expirationTime - when this JWT expirespublic Jwt.Builder issueTime(Instant issueTime)
issueTime - when this JWT was createdpublic Jwt.Builder notBefore(Instant notBefore)
notBefore - JWT is not valid before this timepublic Jwt.Builder subject(String subject)
subject - subject of this JWtpublic Jwt.Builder userPrincipal(String principal)
principal - name of the principal, falls back to preferredUsername(String) and then to
subject(String)public Jwt.Builder audience(String audience)
audience - audience of this JWTpublic Jwt.Builder jwtId(String jwtId)
jwtId - unique identifierpublic Jwt.Builder email(String email)
email - email claim for this JWT's subjectpublic Jwt.Builder emailVerified(Boolean emailVerified)
emailVerified - true if verifiedpublic Jwt.Builder fullName(String fullName)
fullName - full name of the subjectpublic Jwt.Builder givenName(String givenName)
givenName - given name of the subjectpublic Jwt.Builder middleName(String middleName)
middleName - middle name of the subjectpublic Jwt.Builder familyName(String familyName)
familyName - family name of the subjectpublic Jwt.Builder locale(Locale locale)
locale - locale to usepublic Jwt.Builder nickname(String nickname)
nickname - nicknamepublic Jwt.Builder preferredUsername(String preferredUsername)
preferredUsername - username to viewpublic Jwt.Builder profile(URI profile)
profile - link to profile of subjectpublic Jwt.Builder picture(URI picture)
picture - link to picture of subjectpublic Jwt.Builder website(URI website)
website - link to website of subjectpublic Jwt.Builder gender(String gender)
gender - gender to usepublic Jwt.Builder birthday(LocalDate birthday)
birthday - birthdaypublic Jwt.Builder timeZone(ZoneId timeZone)
timeZone - time zonepublic Jwt.Builder phoneNumber(String phoneNumber)
phoneNumber - phone numberpublic Jwt.Builder phoneNumberVerified(Boolean phoneNumberVerified)
phoneNumberVerified - true if number is verifiedpublic Jwt.Builder updatedAt(Instant updatedAt)
updatedAt - instant of updatepublic Jwt.Builder address(JwtUtil.Address address)
address - address to usepublic Jwt.Builder atHash(byte[] atHash)
atHash - hash to use (explicit). If not defined, it will be computed if needed.public Jwt.Builder cHash(byte[] cHash)
cHash - hash bytes (explicit). If not defined, it will be computed if needed.public Jwt.Builder nonce(String nonce)
nonce - nonce valuepublic Jwt.Builder removePayloadClaim(String name)
name - name of the claim to removeCopyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.