public class TokenUtils
extends java.lang.Object
Constructor and Description |
---|
TokenUtils() |
Modifier and Type | Method and Description |
---|---|
static org.jose4j.jwt.consumer.JwtConsumer |
createJwtConsumer(java.security.PublicKey publicKey)
returns a common
JwtConsumer for building/validating JWS tokens for
OAuth 2 authentication across CCloud
The JWS token must have:
- an issuer `iss` claim representing the principal that issued the token
- a subject `sub` claim representing the principal who will use the token
- a JWT ID `jti` claim which serves as a unique identifier of the token
- a issued at `iat` claim which is the time the token was created
- an expiration time `exp` claim showing the time after which this token
should be considered expired |
static java.security.PublicKey |
loadPublicKey(java.io.InputStream inputStream) |
public static java.security.PublicKey loadPublicKey(java.io.InputStream inputStream) throws java.io.IOException
java.io.IOException
public static org.jose4j.jwt.consumer.JwtConsumer createJwtConsumer(java.security.PublicKey publicKey)
JwtConsumer
for building/validating JWS tokens for
OAuth 2 authentication across CCloud
The JWS token must have:
- an issuer `iss` claim representing the principal that issued the token
- a subject `sub` claim representing the principal who will use the token
- a JWT ID `jti` claim which serves as a unique identifier of the token
- a issued at `iat` claim which is the time the token was created
- an expiration time `exp` claim showing the time after which this token
should be considered expired