Package com.spotify.github.v3.clients
Class JwtTokenIssuer
- java.lang.Object
-
- com.spotify.github.v3.clients.JwtTokenIssuer
-
public class JwtTokenIssuer extends Object
The helper Jwt token issuer.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JwtTokenIssuer
fromFile(File privateKeyFile)
Instantiates a new Jwt token issuer.static JwtTokenIssuer
fromPrivateKey(byte[] privateKey)
Instantiates a new Jwt token issuer.String
getToken(Integer appId)
Generates a JWT token for the given APP ID.
-
-
-
Method Detail
-
fromFile
public static JwtTokenIssuer fromFile(File privateKeyFile) throws NoSuchAlgorithmException, InvalidKeySpecException, IOException
Instantiates a new Jwt token issuer.- Parameters:
privateKeyFile
- the private key file- Throws:
NoSuchAlgorithmException
- the no such algorithm exceptionInvalidKeySpecException
- the invalid key spec exceptionIOException
- the io exception
-
fromPrivateKey
public static JwtTokenIssuer fromPrivateKey(byte[] privateKey) throws NoSuchAlgorithmException, InvalidKeySpecException
Instantiates a new Jwt token issuer.- Parameters:
privateKey
- the private key to use- Throws:
NoSuchAlgorithmException
- the no such algorithm exceptionInvalidKeySpecException
- the invalid key spec exception
-
-