public static class JsonWebTokenClaim.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
JsonWebTokenClaim |
build() |
JsonWebTokenClaim.Builder |
copy(JsonWebTokenClaim model) |
JsonWebTokenClaim.Builder |
isRequired(Boolean isRequired)
Whether the claim is required to be present in the JWT or not.
|
JsonWebTokenClaim.Builder |
key(String key)
Name of the claim.
|
JsonWebTokenClaim.Builder |
values(List<String> values)
The list of acceptable values for a given claim.
|
public JsonWebTokenClaim.Builder key(String key)
Name of the claim.
key
- the value to setpublic JsonWebTokenClaim.Builder values(List<String> values)
The list of acceptable values for a given claim. If this value is “null” or empty and “isRequired” set to “true”, then the presence of this claim in the JWT is validated.
values
- the value to setpublic JsonWebTokenClaim.Builder isRequired(Boolean isRequired)
Whether the claim is required to be present in the JWT or not. If set to “false”, the claim values will be matched only if the claim is present in the JWT.
isRequired
- the value to setpublic JsonWebTokenClaim build()
public JsonWebTokenClaim.Builder copy(JsonWebTokenClaim model)
Copyright © 2016–2024. All rights reserved.