You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Queue-it Queue Token SDK is used to ensure that end users cannot enter the queue without a valid token and to be a container which can car-ry sensitive user information from integrating system into the queue. The token can be issued by any application that supports JAVA 1.6+.
6
+
5
7
## The Token
8
+
6
9
The token consists of two parts. Firstly, a header containing non-sensitive metadata. Secondly the payload of the token.
7
10
Both header and payload are in JSON format.
11
+
8
12
### Token Header
9
-
```
10
-
{
13
+
14
+
```json
15
+
{
11
16
"typ": "QT1",
12
17
"enc": "AES256",
13
18
"iss": 1526464517,
14
19
"exp": 1526524517,
15
20
"ti": "159aba3e-55e1-4f54-b6ee-e5b943d7e885",
16
-
"c": "ticketania",
21
+
"c": "ticketania",
17
22
"e": "demoevent",
18
23
"ip": "75.86.129.4",
19
24
"xff": "45.67.2.4,34.56.3.2"
20
25
}
21
26
```
27
+
22
28
-`typ`: The type of the token. Value must be "QFT1". Required.
23
29
-`enc`: Payload encryption algorithm. Value must be "AES256". Required.
24
30
-`iss`: NumericDate of when token was issued. Required.
@@ -30,13 +36,15 @@ Both header and payload are in JSON format.
30
36
-`xff`: The X-Forwarded-For headerof the request when the token is issued. If provided, the X-Forwarded-For header is validated before issuing the token. Optional.
31
37
32
38
### Token Payload
33
-
```
34
-
{
39
+
40
+
```json
41
+
{
35
42
"r": 0.4578,
36
43
"k": "XKDI42W",
37
44
"cd": { "size": "medium" }
38
45
}
39
46
```
47
+
40
48
-`r`: The relative quality of the key. Must be a decimal value. Used for determining the quality of the token. Optional
41
49
-`k`: A unique key that holds value to the integrating system (e.g. email or user id). Used to restrict users from issuing multiple queue ids. Optional.
42
50
-`cd`: Any custom data of the user. This is a set of key-value pairs. Optional
@@ -62,6 +70,7 @@ const tokenValue = token.Token;
62
70
```
63
71
64
72
### Specifying token identifier prefix
73
+
65
74
A prefix for the token identifier can optionally be provided to restrict the user session after getting through the queue to the one used before entering the queue. Once the user is through the queue the token identifier is provided to the target application in the Known User token. The format of the token identifier is then `[YOUR PREFIX]~[GUID]`, e.g: AnfTDnpwazllYmnmgaCJ8tErV80YHv77ni5NgqQNhfWwxNqrNcHb~e937ef0d-48ec-4ff7-866e-52033273cb3d.
Copy file name to clipboardExpand all lines: package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
-
"name": "@queue-it/enqueue-token",
3
-
"version": "1.0.0",
2
+
"name": "@queue-it/queue-token",
3
+
"version": "1.0.1",
4
4
"description": "Ensures that end users cannot enter the queue without a valid token and to be a container which can carry sensitive user information from integrating system into the queue",
0 commit comments