| Modifier and Type | Class and Description |
|---|---|
static class |
JWTConfig.Builder |
| Modifier and Type | Field and Description |
|---|---|
EnumWrapper<JwtAlgorithm> |
algorithm |
String |
clientId
App client ID
|
String |
clientSecret
App client secret
|
String |
enterpriseId
Enterprise ID
|
String |
jwtKeyId
Public key ID
|
String |
privateKey
Private key
|
PrivateKeyDecryptor |
privateKeyDecryptor |
String |
privateKeyPassphrase
Passphrase
|
TokenStorage |
tokenStorage |
String |
userId
User ID
|
| Modifier | Constructor and Description |
|---|---|
protected |
JWTConfig(JWTConfig.Builder builder) |
|
JWTConfig(String clientId,
String clientSecret,
String jwtKeyId,
String privateKey,
String privateKeyPassphrase) |
| Modifier and Type | Method and Description |
|---|---|
static JWTConfig |
fromConfigFile(String configFilePath)
Create an auth instance as defined by a JSON file downloaded from the Box Developer Console.
|
static JWTConfig |
fromConfigFile(String configFilePath,
PrivateKeyDecryptor privateKeyDecryptor)
Create an auth instance as defined by a JSON file downloaded from the Box Developer Console.
|
static JWTConfig |
fromConfigFile(String configFilePath,
TokenStorage tokenStorage)
Create an auth instance as defined by a JSON file downloaded from the Box Developer Console.
|
static JWTConfig |
fromConfigFile(String configFilePath,
TokenStorage tokenStorage,
PrivateKeyDecryptor privateKeyDecryptor)
Create an auth instance as defined by a JSON file downloaded from the Box Developer Console.
|
static JWTConfig |
fromConfigJsonString(String configJsonString)
Create an auth instance as defined by a string content of JSON file downloaded from the Box
Developer Console.
|
static JWTConfig |
fromConfigJsonString(String configJsonString,
PrivateKeyDecryptor privateKeyDecryptor)
Create an auth instance as defined by a string content of JSON file downloaded from the Box
Developer Console.
|
static JWTConfig |
fromConfigJsonString(String configJsonString,
TokenStorage tokenStorage)
Create an auth instance as defined by a string content of JSON file downloaded from the Box
Developer Console.
|
static JWTConfig |
fromConfigJsonString(String configJsonString,
TokenStorage tokenStorage,
PrivateKeyDecryptor privateKeyDecryptor)
Create an auth instance as defined by a string content of JSON file downloaded from the Box
Developer Console.
|
EnumWrapper<JwtAlgorithm> |
getAlgorithm() |
String |
getClientId() |
String |
getClientSecret() |
String |
getEnterpriseId() |
String |
getJwtKeyId() |
String |
getPrivateKey() |
PrivateKeyDecryptor |
getPrivateKeyDecryptor() |
String |
getPrivateKeyPassphrase() |
TokenStorage |
getTokenStorage() |
String |
getUserId() |
public final String clientSecret
public final String privateKey
public final String privateKeyPassphrase
public String enterpriseId
public EnumWrapper<JwtAlgorithm> algorithm
public TokenStorage tokenStorage
public PrivateKeyDecryptor privateKeyDecryptor
public JWTConfig(String clientId, String clientSecret, String jwtKeyId, String privateKey, String privateKeyPassphrase)
protected JWTConfig(JWTConfig.Builder builder)
public static JWTConfig fromConfigJsonString(String configJsonString)
configJsonString - String content of JSON file containing the configuration.public static JWTConfig fromConfigJsonString(String configJsonString, TokenStorage tokenStorage)
configJsonString - String content of JSON file containing the configuration.tokenStorage - Object responsible for storing token. If no custom implementation provided,
the token will be stored in memorypublic static JWTConfig fromConfigJsonString(String configJsonString, PrivateKeyDecryptor privateKeyDecryptor)
configJsonString - String content of JSON file containing the configuration.privateKeyDecryptor - Object responsible for decrypting private key for jwt auth. If no
custom implementation provided, the DefaultPrivateKeyDecryptor will be used.public static JWTConfig fromConfigJsonString(String configJsonString, TokenStorage tokenStorage, PrivateKeyDecryptor privateKeyDecryptor)
configJsonString - String content of JSON file containing the configuration.tokenStorage - Object responsible for storing token. If no custom implementation provided,
the token will be stored in memoryprivateKeyDecryptor - Object responsible for decrypting private key for jwt auth. If no
custom implementation provided, the DefaultPrivateKeyDecryptor will be used.public static JWTConfig fromConfigFile(String configFilePath)
configFilePath - Path to the JSON file containing the configuration.public static JWTConfig fromConfigFile(String configFilePath, TokenStorage tokenStorage)
configFilePath - Path to the JSON file containing the configuration.tokenStorage - Object responsible for storing token. If no custom implementation provided,
the token will be stored in memory.public static JWTConfig fromConfigFile(String configFilePath, PrivateKeyDecryptor privateKeyDecryptor)
configFilePath - Path to the JSON file containing the configuration.privateKeyDecryptor - Object responsible for decrypting private key for jwt auth. If no
custom implementation provided, the DefaultPrivateKeyDecryptor will be used.public static JWTConfig fromConfigFile(String configFilePath, TokenStorage tokenStorage, PrivateKeyDecryptor privateKeyDecryptor)
configFilePath - Path to the JSON file containing the configuration.tokenStorage - Object responsible for storing token. If no custom implementation provided,
the token will be stored in memory.privateKeyDecryptor - Object responsible for decrypting private key for jwt auth. If no
custom implementation provided, the DefaultPrivateKeyDecryptor will be used.public String getClientId()
public String getClientSecret()
public String getJwtKeyId()
public String getPrivateKey()
public String getPrivateKeyPassphrase()
public String getEnterpriseId()
public EnumWrapper<JwtAlgorithm> getAlgorithm()
public TokenStorage getTokenStorage()
public PrivateKeyDecryptor getPrivateKeyDecryptor()