public class JWTAuthMethod extends AbstractAuthMethod
| Modifier and Type | Field and Description |
|---|---|
int |
SORT_KEY |
| Constructor and Description |
|---|
JWTAuthMethod(java.lang.String applicationId,
byte[] privateKey) |
JWTAuthMethod(java.lang.String applicationId,
java.nio.file.Path path) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.http.client.methods.RequestBuilder |
apply(org.apache.http.client.methods.RequestBuilder request) |
static java.lang.String |
constructJTI() |
java.lang.String |
constructToken(long iat,
java.lang.String jti) |
protected byte[] |
decodePrivateKey(byte[] data) |
int |
getSortKey() |
compareTopublic final int SORT_KEY
public JWTAuthMethod(java.lang.String applicationId, byte[] privateKey) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.spec.InvalidKeySpecException
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.security.spec.InvalidKeySpecExceptionpublic JWTAuthMethod(java.lang.String applicationId, java.nio.file.Path path) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.spec.InvalidKeySpecException, java.io.IOException
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.security.spec.InvalidKeySpecExceptionjava.io.IOExceptionpublic static java.lang.String constructJTI()
protected byte[] decodePrivateKey(byte[] data) throws java.security.InvalidKeyException
java.security.InvalidKeyExceptionpublic org.apache.http.client.methods.RequestBuilder apply(org.apache.http.client.methods.RequestBuilder request)
public java.lang.String constructToken(long iat, java.lang.String jti)
public int getSortKey()
getSortKey in interface AuthMethodgetSortKey in class AbstractAuthMethod