@Configuration @Conditional(value=PingFederateSecurityConditions.PingFederateJWTEnabled.class) public class PingFederateJWTConfig extends java.lang.Object
Constructor and Description |
---|
PingFederateJWTConfig() |
Modifier and Type | Method and Description |
---|---|
org.jose4j.jwt.consumer.JwtConsumer |
jwtConsumer(java.security.PublicKey jwtPublicKey,
PingFederateValidator pingFederateValidator)
The jwtConsumer class which will be used to verify and parse the JWT token from ping federate.
|
java.security.PublicKey |
jwtPublicKey(java.lang.String keyValue)
The public key used to verify the signatures of JWT tokens.
|
PingFederateJWTTokenServices |
pingFederateJWTTokenServices(org.jose4j.jwt.consumer.JwtConsumer jwtConsumer,
io.micrometer.core.instrument.MeterRegistry registry)
The token services class used to take a JWT token and produce a Spring Security Authentication object.
|
PingFederateValidator |
pingFederateValidator(io.micrometer.core.instrument.MeterRegistry registry)
A validator which checks the validity of the JWT tokens sent in from ping federate against expected
Genie required fields.
|
@Bean public PingFederateValidator pingFederateValidator(io.micrometer.core.instrument.MeterRegistry registry)
registry
- The metrics registry to use@Bean public java.security.PublicKey jwtPublicKey(@Value(value="${genie.security.oauth2.pingfederate.jwt.keyValue}") java.lang.String keyValue) throws java.io.IOException, org.jose4j.lang.JoseException, java.security.spec.InvalidKeySpecException, java.security.cert.CertificateException
keyValue
- The string of the public key to use in either RSA or X.509 formatjava.io.IOException
- On reading or closing byte array input streamorg.jose4j.lang.JoseException
- When trying to create the key using jose libraryjava.security.spec.InvalidKeySpecException
- When the cert has an invalid specjava.security.cert.CertificateException
- When trying to create a X.509 specification object@Bean public org.jose4j.jwt.consumer.JwtConsumer jwtConsumer(@Qualifier(value="jwtPublicKey") java.security.PublicKey jwtPublicKey, PingFederateValidator pingFederateValidator)
jwtPublicKey
- The public key used to verify the signature on the JWT token.pingFederateValidator
- The validator to add to the validation chain specifically for Ping Federate@Bean @Primary public PingFederateJWTTokenServices pingFederateJWTTokenServices(org.jose4j.jwt.consumer.JwtConsumer jwtConsumer, io.micrometer.core.instrument.MeterRegistry registry)
jwtConsumer
- The JWT consumer used to verify and parse the JWT tokensregistry
- The metrics registry to use for collecting metrics