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:
  • Constructor Details

    • JwtSigningKeyProvider

      public JwtSigningKeyProvider()
  • Method Details

    • 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 from select(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.