Class AuthTokenUtils

java.lang.Object
org.apache.pulsar.broker.authentication.utils.AuthTokenUtils

public class AuthTokenUtils extends Object
  • Constructor Details

    • AuthTokenUtils

      public AuthTokenUtils()
  • Method Details

    • createSecretKey

      public static SecretKey createSecretKey(io.jsonwebtoken.SignatureAlgorithm signatureAlgorithm)
    • decodeSecretKey

      public static SecretKey decodeSecretKey(byte[] secretKey)
    • decodePrivateKey

      public static PrivateKey decodePrivateKey(byte[] key, io.jsonwebtoken.SignatureAlgorithm algType) throws IOException
      Throws:
      IOException
    • decodePublicKey

      public static PublicKey decodePublicKey(byte[] key, io.jsonwebtoken.SignatureAlgorithm algType) throws IOException
      Throws:
      IOException
    • encodeKeyBase64

      public static String encodeKeyBase64(Key key)
    • createToken

      public static String createToken(Key signingKey, String subject, Optional<Date> expiryTime)
    • readKeyFromUrl

      public static byte[] readKeyFromUrl(String keyConfUrl) throws IOException
      Throws:
      IOException