Package io.jenkins.blueocean.auth.jwt
Class JwtSigningKeyProvider
- java.lang.Object
-
- io.jenkins.blueocean.auth.jwt.JwtSigningKeyProvider
-
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
SigningKeyProviderImpl
public abstract class JwtSigningKeyProvider extends Object implements ExtensionPoint
PublicKey provider, to be used during signing- Author:
- Vivek Pandey
- See Also:
JwtTokenVerifier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description JwtSigningKeyProvider()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ExtensionList<JwtSigningKeyProvider>
all()
abstract SigningPublicKey
getPublicKey(String keyId)
Provides public key needed to verify the token.abstract SigningKey
select(JwtToken token)
Chooses the key to sign the given token.static SigningPublicKey
toPublicKey(String keyId)
Search through all the providers and find the public key that matches the given key ID.
-
-
-
Method Detail
-
select
@CheckForNull public abstract SigningKey select(JwtToken token)
Chooses the key to sign the given token.- 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
@CheckForNull public abstract SigningPublicKey getPublicKey(String keyId)
Provides public key needed to verify the token.- Parameters:
keyId
-SigningKey.kid
returned fromselect(JwtToken)
- Returns:
- null if this provider doesn't recognize the given key ID.
-
all
public static ExtensionList<JwtSigningKeyProvider> all()
-
toPublicKey
@CheckForNull public static SigningPublicKey toPublicKey(String keyId)
Search through all the providers and find the public key that matches the given key ID.
-
-