Class SigningKeyProviderImpl
- java.lang.Object
-
- io.jenkins.blueocean.auth.jwt.JwtSigningKeyProvider
-
- io.jenkins.blueocean.auth.jwt.impl.SigningKeyProviderImpl
-
- All Implemented Interfaces:
ExtensionPoint
@Extension(ordinal=-9999.0) public class SigningKeyProviderImpl extends JwtSigningKeyProvider
DefaultJwtSigningKeyProvider
that rotates a key over time.- Author:
- Kohsuke Kawaguchi, Vivek Pandey
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static DateTimeFormatter
DATE_FORMAT
-
Constructor Summary
Constructors Constructor Description SigningKeyProviderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SigningPublicKey
getPublicKey(String kid)
Provides public key needed to verify the token.SigningKey
select(JwtToken token)
Chooses the key to sign the given token.-
Methods inherited from class io.jenkins.blueocean.auth.jwt.JwtSigningKeyProvider
all, toPublicKey
-
-
-
-
Field Detail
-
DATE_FORMAT
public static final DateTimeFormatter DATE_FORMAT
-
-
Method Detail
-
select
public SigningKey select(JwtToken token)
Description copied from class:JwtSigningKeyProvider
Chooses the key to sign the given token.- Specified by:
select
in classJwtSigningKeyProvider
- Parameters:
token
- Token to be signed- Returns:
- null if this provider refuses to sign the given token, in which case the next provider will get the chance.
-
getPublicKey
public SigningPublicKey getPublicKey(String kid)
Description copied from class:JwtSigningKeyProvider
Provides public key needed to verify the token.- Specified by:
getPublicKey
in classJwtSigningKeyProvider
- Parameters:
kid
-SigningKey.kid
returned fromJwtSigningKeyProvider.select(JwtToken)
- Returns:
- null if this provider doesn't recognize the given key ID.
-
-