File tree 1 file changed +23
-31
lines changed
1 file changed +23
-31
lines changed Original file line number Diff line number Diff line change 4
4
:host = localhost:3000
5
5
:appkey = key
6
6
:api = :http://:host
7
- :token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIiA6ICJ3ZWJ1c2VyIiwgInVzZXJfaWQiIDogMywgImV4cCIgOiAxNTk1NjEzMTk0fQ.ahy1U_sSuSVqscdRZcp_BTth0LYdub6h9a5j2M5mwXE
8
7
9
- # :header = <<
10
- # apikey: :appkey
11
- # Content-Type: application/json
12
- #
13
- #
14
8
:header = <<
15
9
apikey: :appkey
16
10
User-Agent: restclient/2.0
17
11
Content-Type: application/json
18
12
19
- #header with token
20
- :headerT = <<
21
- :header
22
- Authorization: Bearer :token
23
-
24
-
25
13
#GET PING
26
14
GET :api/
27
15
:header
28
16
17
+ # register
18
+ POST :api/rpc/register
19
+ :header
20
+ {
21
+ "name" : " alice" ,
22
+
23
+ "password" : " pass2" ,
24
+ "cookie" : false
25
+ }
29
26
30
- #GET LOGin
27
+ #login
31
28
POST :api/rpc/login
32
29
:header
33
30
{
34
31
35
- "password" : " pass" ,
36
- "jwt_cookie" : false ,
37
- "rt_cookie" : true ,
38
- "csrf" : false
32
+ "password" : " pass"
39
33
}
40
34
35
+ :token =
36
+ :refresh_token =
41
37
42
- # POST register
43
- POST :api/rpc/register
38
+ #header with token
39
+ :headerT = <<
44
40
:header
41
+ Authorization: Bearer :token
42
+
43
+ #logout
44
+ POST :api/rpc/logout
45
+ :headerT
45
46
{
46
- "name" : " alice" ,
47
-
48
- "password" : " pass2" ,
49
- "jwt_cookie" : false ,
50
- "rt_cookie" : true ,
51
- "csrf" : false
47
+ "refresh_token" : :refresh_token
52
48
}
53
49
54
50
#GET TODO
@@ -60,23 +56,20 @@ GET :api/todos
60
56
GET :api/sessions
61
57
:header
62
58
63
-
64
-
65
59
#GET TODO
66
60
POST :api/rpc/refresh_token
67
61
:header
68
62
{
69
- "refresh_token" : " de688895-6181-440f-a25a-8a9ba14b2162 "
63
+ "refresh_token" : :refresh_token
70
64
}
71
65
72
66
#Logout
73
67
POST :api/rpc/logout
74
68
:headerT
75
69
{
76
- "refresh_token" : " de688895-6181-440f-a25a-8a9ba14b2162 "
70
+ "refresh_token" : :refresh_token
77
71
}
78
72
79
-
80
73
#GET ME
81
74
GET :api/rpc/me
82
75
:headerT
@@ -85,7 +78,6 @@ GET :api/rpc/me
85
78
GET :api/todos?id=eq.1
86
79
:headerT
87
80
88
-
89
81
#GET TODO
90
82
GET :api/todos?id=eq.2
91
83
:headerT
You can’t perform that action at this time.
0 commit comments