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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionList<JwtSigningKeyProvider> all()abstract SigningPublicKeygetPublicKey(String keyId) Provides public key needed to verify the token.abstract SigningKeyChooses the key to sign the given token.static SigningPublicKeytoPublicKey(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.kidreturned 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.
-