| Package | Description |
|---|---|
| com.sap.cloud.security.test |
| Modifier and Type | Method and Description |
|---|---|
static JwtGenerator |
JwtGenerator.getInstance(Service service,
String clientId) |
JwtGenerator |
SecurityTestRule.getPreconfiguredJwtGenerator()
Note: the JwtGenerator is fully configured as part of
SecurityTestRule.before()
method. |
JwtGenerator |
JwtGenerator.withClaimsFromFile(String claimsJsonFilePath)
This method will fill the token with all the claims that are defined inside
the given file.
|
JwtGenerator |
JwtGenerator.withClaimValue(String claimName,
JsonObject object)
Sets the claim with the given name to the given string value.
|
JwtGenerator |
JwtGenerator.withClaimValue(String claimName,
String value)
Sets the claim with the given name to the given string value.
|
JwtGenerator |
JwtGenerator.withClaimValues(String claimName,
String... values)
Sets the claim with the given name to the given string values.
|
JwtGenerator |
JwtGenerator.withExpiration(java.time.Instant expiration)
Sets the expiration claim (exp) of the token to the given moment in time.
|
JwtGenerator |
JwtGenerator.withHeaderParameter(String parameterName,
String value)
Sets the header parameter with the given name to the given string value.
|
JwtGenerator |
JwtGenerator.withPrivateKey(PrivateKey privateKey)
Sets the private key that is used to sign the token.
|
JwtGenerator |
JwtGenerator.withScopes(String... scopes)
Sets the roles as claim "scope" to the jwt.
|
JwtGenerator |
JwtGenerator.withSignatureAlgorithm(JwtSignatureAlgorithm signatureAlgorithm)
Sets the signature algorithm that is used to create the signature of the
token.
|
Copyright © 2020. All rights reserved.