Authorization
Authorization
The authorization class defines the auth related queries of an app.
Example:
import * as contentstack from '@contentstack/marketplace-sdk'
const client = contentstack.client({ authtoken: 'TOKEN'});
client.marketplace('organization_uid').app('manifest_uid').authorization();findAll
The findAll method retrieves the requests of all authorized apps in a particular organization.
| Name | Type | Description |
|---|---|---|
| skip | Number | Offset for skipping content in response |
| limit | Number | Limit on API response to provide content in the list |
| order | Must be one of ['asc', 'desc', 'ASC', 'DESC'] | Specify the order in which the apps should appear in the response, either ascending or descending. |
| sort | Must be one of ['name', 'updated_at', 'created_at'] | The order in which apps are sorted. |
| search | String | String for search by app name |
Example:
import * as contentstack from '@contentstack/marketplace-sdk'
const client = contentstack.client({ authtoken: 'TOKEN'});
client.marketplace('organization_uid').app('manifest_uid').authorization().findAll({ skip: 10, limit: 10, order: 'asc' })
.then((response) => console.log(response));revokeAll
Revoke all users tokens issued to an authorized app for the particular organization.
Example:
import * as contentstack from '@contentstack/marketplace-sdk'
const client = contentstack.client({ authtoken: 'TOKEN'});
client.marketplace('organization_uid').app('manifest_uid').authorization().revokeAll()
.then((response) => console.log(response));revoke
Revoke user token issued to an authorized app for the particular organization.
Example:
import * as contentstack from '@contentstack/marketplace-sdk'
const client = contentstack.client({ authtoken: 'TOKEN'});
client.marketplace('organization_uid').app('manifest_uid').authorization().revoke('authorization_uid')
.then((response) => console.log(response));