Class AuthTokenUtils
java.lang.Object
org.apache.pulsar.broker.authentication.utils.AuthTokenUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SecretKeycreateSecretKey(io.jsonwebtoken.SignatureAlgorithm signatureAlgorithm) static StringcreateToken(Key signingKey, String subject, Optional<Date> expiryTime) static PrivateKeydecodePrivateKey(byte[] key, io.jsonwebtoken.SignatureAlgorithm algType) static PublicKeydecodePublicKey(byte[] key, io.jsonwebtoken.SignatureAlgorithm algType) static SecretKeydecodeSecretKey(byte[] secretKey) static StringencodeKeyBase64(Key key) static byte[]readKeyFromUrl(String keyConfUrl)
-
Constructor Details
-
AuthTokenUtils
public AuthTokenUtils()
-
-
Method Details
-
createSecretKey
-
decodeSecretKey
-
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
-
createToken
-
readKeyFromUrl
- Throws:
IOException
-