Constructor and Description |
---|
BoxConfig(String clientId,
String clientSecret)
Creates a configuration with a clientId and clientSecret.
|
BoxConfig(String clientId,
String clientSecret,
String enterpriseId,
JWTEncryptionPreferences jwtEncryptionPreferences)
Creates a configuration with clientId, clientSecret and JWTEncryptionPreferences.
|
BoxConfig(String clientId,
String clientSecret,
String enterpriseId,
String publicKeyID,
String privateKey,
String privateKeyPassword)
Creates a configuration with RSA_SHA_256 as the encryption algorithm.
|
BoxConfig(String clientId,
String clientSecret,
String enterpriseId,
String publicKeyID,
String privateKey,
String privateKeyPassword,
EncryptionAlgorithm encryptionAlgorithm)
Creates a configuration with clientId, clientSecret, publicKeyID, privateKey, privateKeyPassword.
|
Modifier and Type | Method and Description |
---|---|
String |
getClientId() |
String |
getClientSecret() |
String |
getEnterpriseId() |
JWTEncryptionPreferences |
getJWTEncryptionPreferences() |
static BoxConfig |
readFrom(Reader reader)
Reads OAuth 2.0 with JWT app configurations from the reader.
|
static BoxConfig |
readFrom(String jsonString)
Reads OAuth 2.0 with JWT app configurations from the Json string.
|
void |
setClientId(String clientId) |
void |
setClientSecret(String clientSecret) |
void |
setEnterpriseId(String enterpriseId) |
void |
setJWTEncryptionPreferences(JWTEncryptionPreferences jwtEncryptionPreferences) |
void |
setPrivateKeyDecryptor(IPrivateKeyDecryptor privateKeyDecryptor)
Sets a custom decryptor used for decrypting the private key.
|
public BoxConfig(String clientId, String clientSecret)
clientId
- the client ID of the applicationclientSecret
- the client secret of the applicationpublic BoxConfig(String clientId, String clientSecret, String enterpriseId, JWTEncryptionPreferences jwtEncryptionPreferences)
clientId
- the client ID of the applicationclientSecret
- the client secret of the applicationenterpriseId
- the enterprise ID of the box accountjwtEncryptionPreferences
- the JWTEncryptionPreferences of the applicationpublic BoxConfig(String clientId, String clientSecret, String enterpriseId, String publicKeyID, String privateKey, String privateKeyPassword, EncryptionAlgorithm encryptionAlgorithm)
clientId
- the client ID of the applicationclientSecret
- the client secret of the applicationenterpriseId
- the enterprise ID of the box accountpublicKeyID
- the unique ID of the uploaded public keyprivateKey
- the private key used to sign JWT requestsprivateKeyPassword
- the passphrase for the private keyencryptionAlgorithm
- the encryption algorithm that has to be used for signing JWT requestspublic BoxConfig(String clientId, String clientSecret, String enterpriseId, String publicKeyID, String privateKey, String privateKeyPassword)
clientId
- the client ID of the applicationclientSecret
- the client secret of the applicationenterpriseId
- the enterprise ID of the box accountpublicKeyID
- the unique ID of the uploaded public keyprivateKey
- the private key used to sign JWT requestsprivateKeyPassword
- the passphrase for the private keypublic static BoxConfig readFrom(Reader reader) throws IOException
reader
- a reader object which points to a JSON formatted configuration fileIOException
- when unable to access the mapping file's content of the readerpublic static BoxConfig readFrom(String jsonString)
jsonString
- a Json stringrepresenting formatted configuration filepublic String getClientSecret()
public void setClientSecret(String clientSecret)
clientSecret
- client secret of the applicationpublic String getEnterpriseId()
public void setEnterpriseId(String enterpriseId)
enterpriseId
- enterprise ID of the applicationpublic JWTEncryptionPreferences getJWTEncryptionPreferences()
public void setJWTEncryptionPreferences(JWTEncryptionPreferences jwtEncryptionPreferences)
jwtEncryptionPreferences
- encryption preferences for JWT based authenticationpublic String getClientId()
public void setClientId(String clientId)
clientId
- client ID of the Applicationpublic void setPrivateKeyDecryptor(IPrivateKeyDecryptor privateKeyDecryptor)
privateKeyDecryptor
- privateKeyDecryptor the decryptor used for decrypting the private key.