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
PublicKey provider, to be used during signing
- Author:
- Vivek Pandey
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionList<JwtSigningKeyProvider>
all()
abstract SigningPublicKey
getPublicKey
(String keyId) Provides public key needed to verify the token.abstract SigningKey
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.
-
Constructor Details
-
JwtSigningKeyProvider
public JwtSigningKeyProvider()
-
-
Method Details
-
select
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
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
-
toPublicKey
Search through all the providers and find the public key that matches the given key ID.
-