A JavaScript module which provides functions for the current product context.
Retrieves the current user context as a JWT token containing details such as space key, issue id, etc. Throws an error if add-on does not support JWT authentication
Name | Type | Description |
---|---|---|
callback | function | the callback that handles the response |
[ 'Promise' ].<string>
A promise that contains the token
1 2 3
AP.context.getToken(function(token){
console.log("JWT token string", token);
});
Retrieves the current user context containing details such as space key, issue id, etc.
Name | Type | Description |
---|---|---|
callback | function | the callback that handles the response |
[ 'Promise' ].<Object>
A promise that contains the context
1 2 3 4 5
AP.context.getContext(function(response){
console.log("Jira Issue Key", response.issue_key);
console.log("Confluence page id", response.pageId);
console.log("license status", response.license);
});
Rate this page: