Appearance
Access ​
Orisha Commerce Platform uses Auth0 for authentication (verifying user and machine identities). Authorization (determining permissions) is managed within the Orisha Commerce Platform itself.
The following sections outline the steps to gain access to each application.
Admin portal ​
Create a user in Auth0
- Log in to the Auth0 management portal for the
orisha-commerce-platformtenant. - Navigate to the User Management module and create a new user.
- Log in to the Auth0 management portal for the
Assign a role
- Locate the newly created user and assign the
Orisha Commerce Platform Admin accessrole. - This grants the user permission to log into the Admin portal.
- Locate the newly created user and assign the
The user can now access the Admin portal
App ​
Create a user in Auth0
- Log in to the Auth0 management portal for the
orisha-commerce-platformtenant. - Navigate to the User Management module and create a new user.
- Copy and store the
user_idfor later use (it typically starts withauth0|...).
- Log in to the Auth0 management portal for the
Assign a role
- Locate the newly created user and assign the
Orisha Commerce Platform App accessrole. - This allows the user to log into the App.
- Locate the newly created user and assign the
Create a new identity in the Admin portal
- Log into the Admin portal.
- Navigate to the Identities module and create a new user identity.
- Use the copied
user_idfrom Auth0 as the identifier. - Assign the appropriate administrations to the identity.
The user can now access the App
API ​
Setup ​
Create a new application in Auth0
- Log in to the Auth0 management portal for the
orisha-commerce-platformtenant. - Navigate to the Applications module and create a new application.
- Copy and store the Client ID for later use.
- Log in to the Auth0 management portal for the
Authorize the API
- Locate the newly created application and authorize
Orisha Commerce Platform APIunder the APIs tab.
- Locate the newly created application and authorize
Create a new identity in the Admin portal
- Log into the Admin portal.
- Navigate to the Identities module and create a new application identity.
- Use the copied Client ID from Auth0 as the identifier, appending
@clientsto it.- Example: If the Client ID is
3KqAm3tLnJeiK94MMlqAar, the identifier should be3KqAm3tLnJeiK94MMlqAar@clients.
- Example: If the Client ID is
- Assign the appropriate administrations to the identity.
The machine can now generate access tokens
Generate access token and perform requests ​
Before generating access tokens, ensure that Auth0 is properly configured to issue them.
Retrieve the Client ID and Secret
- Log in to the Auth0 management portal for the
orisha-commerce-platformtenant. - Navigate to the correct application under the Applications module.
- Copy and store the Client ID and Client Secret for later use.
- Log in to the Auth0 management portal for the
Generate an access token
Perform a client credentials exchange to obtain an access token:
shcurl --request POST \ --url https://auth.core-suite.io/oauth/token \ --header 'content-type: application/json' \ --data '{ "client_id": "[CLIENT_ID]", "client_secret": "[SECRET]", "audience": "https://ocp-publicapi.core-suite.io/", "grant_type": "client_credentials" }'Response:
json{ "access_token": "...", "token_type": "Bearer" }Perform API requests
Use the access token to make authorized requests to the API:
shcurl --request POST \ --url https://publicapi-ocp-acc.core-suite.io/alpha/auth/me \ --header 'authorization: Bearer [ACCESS_TOKEN]'Response:
json{ "identifier": "....@clients", "name": "Orisha Commerce Platform - Customer XYZ", "type": "Application", "administrations": [ { "code": "customer-xyz", "name": "Customer XYZ" } ] }