public final class PrivateAppAuthorisation extends Object implements AppAuthorisation
ACCOUNT_TOKEN_HEADER, APP_HEADER, DEV_HEADER, LEGACY_AUTH_HEADER, STAFF_TOKEN_HEADER| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Account |
getAccount()
Returns the Brightpearl customer's account.
|
String |
getAccountToken() |
PrivateAppIdentity |
getAppIdentity() |
Map<String,String> |
getHeaders()
Returns authentication headers required for requests made to the customer's account.
|
String |
getStaffToken() |
int |
hashCode() |
static PrivateAppAuthorisation |
staff(PrivateAppIdentity appIdentity,
String staffToken)
Create account authorisation details for a staff authorised API call for a private app.
|
static PrivateAppAuthorisation |
system(PrivateAppIdentity appIdentity,
String accountToken)
Create account authorisation details for a private (own account) system-to-system call using the account token
generated for a private app.
|
String |
toString() |
public static PrivateAppAuthorisation system(PrivateAppIdentity appIdentity, String accountToken)
appIdentity - Details of the private app including the Brightpearl customer account it belongs to.accountToken - Account token generated for the private app.public static PrivateAppAuthorisation staff(PrivateAppIdentity appIdentity, String staffToken)
appIdentity - Details of the private app including the Brightpearl customer account it belongs to.staffToken - Account token, signed or unsigned. If it is unsigned, the developer secret is required.public PrivateAppIdentity getAppIdentity()
public String getAccountToken()
public String getStaffToken()
public Account getAccount()
AppAuthorisationgetAccount in interface AppAuthorisationpublic Map<String,String> getHeaders()
AppAuthorisationgetHeaders in interface AppAuthorisationCopyright © 2014. All Rights Reserved.