public final class PublicAppAuthorisation 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() |
PublicAppIdentity |
getAppIdentity() |
Map<String,String> |
getHeaders()
Returns authentication headers required for requests made to the customer's account.
|
String |
getStaffToken() |
int |
hashCode() |
static PublicAppAuthorisation |
staff(PublicAppIdentity appIdentity,
Account account,
String staffToken)
Create account authorisation details for a staff authorised API call.
|
static PublicAppAuthorisation |
system(PublicAppIdentity appIdentity,
Account account,
String accountToken)
Create account authorisation details for a system-to-system call using an account token.
|
String |
toString() |
public static PublicAppAuthorisation system(PublicAppIdentity appIdentity, Account account, String accountToken)
appIdentity - Identifies the developer and app.account - Brightpearl customer account details.accountToken - Account token, signed or unsigned. If it is unsigned, the developer secret is required.public static PublicAppAuthorisation staff(PublicAppIdentity appIdentity, Account account, String staffToken)
appIdentity - Identifies the developer and app.account - Brightpearl customer account details.staffToken - Account token, signed or unsigned. If it is unsigned, the developer secret is required.public PublicAppIdentity 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.