Class JwtParserManager

java.lang.Object
com.verisign.epp.codec.authtoken.v01.JwtParserManager

public class JwtParserManager extends Object
This class initializes and maintains a cache of JWT Parsers. These parsers can be looked up by either public key or alias.
  • Method Details

    • getInstance

      public static JwtParserManager getInstance()
      Gets the Singleton instance, which will throw the EPPConException if there is an error with the Singleton instantiation.
      Returns:
      Singleton instance of JwtParserManager
      Throws:
      EPPConException - Error creating Singleton instance
    • initParsers

      public void initParsers()
      Builds the JwtParser instances using the latest public keys from the keystore manager.
    • getParser

      public io.jsonwebtoken.JwtParser getParser(String aKeyAlias)
      Retrieves a thread-safe JwtParser by its alias.
      Parameters:
      aKeyAlias - The key alias in the keystore
      Returns:
      The JwtParser, or null if no key exists for that alias
    • getParser

      public io.jsonwebtoken.JwtParser getParser(PublicKey aPubKey)
      Retrieves a thread-safe JwtParser by its publicKey.
      Parameters:
      aPubKey - public key
      Returns:
      The JwtParser, or null if no key exists for that alias
    • getPublicKeys

      public List<PublicKey> getPublicKeys()
      Retrieve a list of public keys
      Returns:
    • getPrivateKey

      public PrivateKey getPrivateKey(String alias) throws EPPException
      Return private key by its alias.
      Parameters:
      alias - alias of the private key in JKS
      Returns:
      Private key
      Throws:
      EPPException - No private key with the given alias found