Skip to content

Commit

Permalink
Merge pull request #67 from StanislavSTW/api-tokens
Browse files Browse the repository at this point in the history
API tokens
  • Loading branch information
maxkuzkin authored May 14, 2022
2 parents 66f7c1a + 2f3c38b commit 8c0a96f
Show file tree
Hide file tree
Showing 24 changed files with 238 additions and 2 deletions.
36 changes: 36 additions & 0 deletions api-tokens/object.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<html>
<head>
<style>
</style>
<meta charset="utf-8">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type='text/javascript' src='http://davidlynch.org/projects/maphilight/jquery.maphilight.js'></script>
<script type="text/javascript">
$(document).ready(function () {
$('.map').maphilight({ alwaysOn: true });
// uncomment this line for normal hover highlighting
// $('.map').maphilight();
});
</script>
</head>
<body>

<!-- Edit with https://summerstyle.github.io/summer/ below -->

<img class="map" src="object.png" alt="" usemap="#map" />
<map name="map">
<area shape="rect" coords="1783, 1320, 2404, 1815" href="s-d-deleted" />
<area shape="rect" coords="1834, 1014, 2356, 1248" href="t-5-token-deleted" />
<area shape="rect" coords="2914, 330, 3514, 855" href="s-c-inactive" />
<area shape="rect" coords="2410, 1, 2881, 169" href="t-4-in-active" />
<area shape="rect" coords="2500, 408, 2806, 582" href="t-3-act-inactive" />
<area shape="rect" coords="1840, 348, 2350, 840" href="s-b-active" />
<area shape="rect" coords="1435, 381, 1717, 591" href="t-2-pen-active" />
<area shape="rect" coords="776, 348, 1297, 812" href="s-a-pending" />
<area shape="rect" coords="386, 417, 695, 605" href="t-1-new-pending" />
</map>

<!-- Edit with https://summerstyle.github.io/summer/ above -->

</body>
</html>
109 changes: 109 additions & 0 deletions api-tokens/object.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"name": "API Tokens",
"image": "object.png",
"readme": "object.md",
"statuses": [
{
"id": "s-a-pending",
"name": "Pending",
"mapping": {
"left": "21.87%",
"top": "20.14%",
"width": "15.18%",
"height": "24.75%"
}
},
{
"id": "s-b-active",
"name": "Active",
"mapping": {
"left": "51.65%",
"top": "19.71%",
"width": "15.18%",
"height": "24.75%"
}
},
{
"id": "s-c-inactive",
"name": "Inactive",
"mapping": {
"left": "82.86%",
"top": "19.6%",
"width": "15.18%",
"height": "24.75%"
}
},
{
"id": "s-d-deleted",
"name": "Deleted",
"mapping": {
"left": "51.85%",
"top": "71.34%",
"width": "15.18%",
"height": "24.75%"
}
}
],
"transitions": [
{
"id": "t-1-new-pending",
"from": "New",
"to": "Pending",
"name": "1. Token Creation",
"mapping": {
"left": "11.4%",
"top": "21.69%",
"width": "8.86%",
"height": "8.62%"
}
},
{
"id": "t-2-pen-active",
"from": "Pending",
"to": "Active",
"name": "2. Token Activation",
"mapping": {
"left": "39.97%",
"top": "21.69%",
"width": "8.86%",
"height": "8.62%"
}
},
{
"id": "t-3-act-inactive",
"from": "Active",
"to": "Inactive",
"name": "3. Token Deactivation",
"mapping": {
"left": "70.76%",
"top": "22.44%",
"width": "8.86%",
"height": "8.62%"
}
},
{
"id": "t-4-in-active",
"from": "Inactive",
"to": "Active",
"name": "4. Token Reactivation",
"mapping": {
"left": "70.59%",
"top": "0.32%",
"width": "8.86%",
"height": "8.62%"
}
},
{
"id": "t-5-token-deleted",
"from": "Pending",
"to": "Deleted",
"name": "5. Token Removal",
"mapping": {
"left": "53.26%",
"top": "54.31%",
"width": "11.77%",
"height": "9.27%"
}
}
]
}
8 changes: 8 additions & 0 deletions api-tokens/object.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Token Objects
## Overview
Tokens represent objects on the CloudBlue Connect platform that are generated by platform users for various operations and implementing integrations through API. Namely, a token object contains *API Key/Handle* that allows applications to bypass the authorization and access the required API.
It is highly important to note that token objects are assigned to module permissions on Connect. Such permissions can be disabled or enabled for each individual module on the platform. Thus, for example, in case your application tries to access a module with disabled permissions, it will return the corresponding error.
Token objects can also be assigned to different extensions that are provided by the Connect platform. However, the workflow of such tokens remains the same.

## Learn more
Refer to the [API Tokens documentation](https://connect.cloudblue.com/community/modules/extensions/api-tokens/) to learn how to create and manage your tokens.
Binary file added api-tokens/object.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added api-tokens/object.pptx
Binary file not shown.
12 changes: 12 additions & 0 deletions api-tokens/s-a-pending.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Pending Status
## Description
Once a new token is created, the system assigns the *Pending* status to this object. This status indicates that the system is processing your token object. Therefore, when the system successfully processes your token, it will be assigned to the following state.
## Prerequisites
A new created token object is required.
## Transferable statuses
Once the system processes the pending token object, it is assigned to the [Active](s-b-active.html) state.
In case operators decide to delete their pending token, this token is assigned to the [Deleted](s-d-deleted.html) state.
## Associated transitions
* [Token Creation](t-1-new-pending.html)
* [Token Activation](t-2-pen-active.html)
* [Token Removal](t-5-token-deleted.html)
Binary file added api-tokens/s-a-pending.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions api-tokens/s-b-active.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Active Status
## Description
The *Active* status indicates that your API token can be used for subsequent operations. This status is automatically assigned to pending token objects by the system, once they are processed successfully. The system enables users to disable their active tokens. Users can also reactivate their inactive tokens if necessary.
## Prerequisites
A new token with the [Pending](s-a-pending.html) status.
Operators can also reactivate their tokens in the [Inactive](s-c-inactive.html) state.
## Transferable statuses
In case your token object is disabled, it is transferred to the [Inactive](s-c-inactive.html) state.
If operators decide to delete their active token, this token is assigned to the [Deleted](s-d-deleted.html) state.
## Associated transitions
* [Token Activation](t-2-pen-active.html)
* [Token Deactivation](t-3-act-inactive.html)
* [Token Reactivation](t-4-in-active.html)
* [Token Removal](t-5-token-deleted.html)
Binary file added api-tokens/s-b-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions api-tokens/s-c-inactive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Inactive Status
## Description
In case operators disable their token on the Connect platform, the system assigns the *Inactive* status to this token. This status indicates that your token cannot be used for integrations or any other operations with API. In case an inactive token is used for such operations, the system will return an error. Inactive tokens can be activated again or removed if necessary
## Prerequisites
A token object with the [Active](s-b-active.html) status.
# Transferable statuses
In case your token object is enabled again, the system transfers it the [Active](s-b-active.html) state.
If operators decide to delete their inactive token, this token is assigned to the [Deleted](s-d-deleted.html) state.
## Associated transitions
* [Token Deactivation](t-3-act-inactive.html)
* [Token Reactivation](t-4-in-active.html)
* [Token Removal](t-5-token-deleted.html)
Binary file added api-tokens/s-c-inactive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions api-tokens/s-d-deleted.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Deleted Status
## Description
The *Deleted* status, as the name implies, is displayed in case operators removed their token. Therefore, this token cannot be used for any operations with API. Note that *Deleted* status represents a terminal state. However, the system allows reviewing creation date, assigned permissions and other general object data of your deleted tokens.
## Prerequisites
A token object in the [Active](s-b-active.html), [Inactive](s-c-inactive.html) , or [Pending](s-a-pending.html) state.
## Associated transitions
* [Token Removal](t-5-token-deleted.html)
Binary file added api-tokens/s-d-deleted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions api-tokens/t-1-new-pending.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Token Creation
## Description
This transition indicates that a new token object is generated on the CloudBlue Connect platform. Therefore, the system starts processing this token assigns it to the *Pending* state.
## Prerequisites
A new generated token object is required for this transition.
## Operation results
A token object with the [Pending](s-a-pending.html) status.
Binary file added api-tokens/t-1-new-pending.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions api-tokens/t-2-pen-active.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Token Activation
## Description
This transition indicates that the system successfully processed a pending token on the Connect platform. Consequently, this token is automatically assigned to the *Active* state and can be used for the following operations through API.
## Prerequisites
A token object with [Pending](s-a-pending.html) status is required for this transition.
## Operation results
A token object in the [Active](s-b-active.html) state.
Binary file added api-tokens/t-2-pen-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions api-tokens/t-3-act-inactive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Token Deactivation
## Description
This transition implies that operators disabled their token on the CloudBlue Connect platform. Thus, this token is assigned to the *Inactive* state. Furthermore, this token cannot be used for any operations through API. If an inactive token is used for such operations, the system will return a corresponding error.
## Prerequisites
A token object with the [Active](s-b-active.html) status is required.
## Operation results
A token object in the [Inactive](s-c-inactive.html) state.
Binary file added api-tokens/t-3-act-inactive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions api-tokens/t-4-in-active.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Token Reactivation
## Description
This transition indicates that operators enabled their token on the Connect platform once again. Therefore, this inactive token is automatically reassigned to the *Active* state and can once again be used for the subsequent operations through API.
## Prerequisites
A token object in the [Inactive](s-c-inactive.html) state is required for this transition.
## Operation results
A token object with the [Active](s-b-active.html) status.
Binary file added api-tokens/t-4-in-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions api-tokens/t-5-token-deleted.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Token Removal
## Description
This transition implies that operators decided to delete their token object. As a result, the system assigns the *Deleted* status to this token and it cannot be used for any operations through API. Note, however, that the system allows reviewing general object information of your deleted tokens.
## Prerequisites
A token in the [Active](s-b-active.html), [Inactive](s-c-inactive.html) , or [Pending](s-a-pending.html) state.
## Operation results
A deleted token object.
Binary file added api-tokens/t-5-token-deleted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@
]
},
"Integrations": {
"description": "Create and manage API tokens, access information, and other integrations with the Extensions Management module.",
"icon": "power"
"description": "Create and manage access tokens, define webhooks, and learn more about extensions with the Integrations Management module.",
"icon": "power",
"objects":[
"api-tokens/object.json"
]
},
"Hubs": {
"description": "Register and manage instances of your Commerce Management systems with the Hubs Management module.",
Expand Down

0 comments on commit 8c0a96f

Please sign in to comment.