-
Notifications
You must be signed in to change notification settings - Fork 0
/
auth.http
121 lines (100 loc) · 4.08 KB
/
auth.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
### Test
GET https://tiger-crunch.com:4433
### Authenticate
POST https://tiger-crunch.com:4433/auth HTTP/1.1
content-type: application/json
{
"claims" :
{
"email": "[email protected]",
"proposedPIN": "1234",
"otp":"603393"
}
}
### Register
POST https://tiger-crunch.com:4433/users HTTP/1.1
content-type: application/json
{
"name":"Paul Sembereka",
"email":"[email protected]",
"phone":"12345678",
"proposedPIN":"1234"
}
### Register 2fa
POST https://tiger-crunch.com:4433/auth/2fa HTTP/1.1
content-type: application/json
{
"proposedPIN":"1234"
}
### Verify 2fa
POST https://tiger-crunch.com:4433/auth/2fa/verify HTTP/1.1
content-type: application/json
{
"otp":"603393"
}
## Clients
### register client
POST https://tiger-crunch.com:4433/clients HTTP/1.1
content-type: application/json
{
"email":"[email protected]",
"project_name":"findyourcat",
"domain":"https://client.tiger-crunch.com:3300"
}
### verify client
GET https://tiger-crunch.com:4433/clients/verify HTTP/1.1
content-type: application/json
{
"client_id": "bd7e5e97-afe4-4796-b757-690ddc79ebb2",
"client_secret": "p4ETQXS1qpoMyiSdWhzjF6fz-u7ot2hD47ZQuCGwuG0="
}
## OAuth grant routes
### request code
GET https://tiger-crunch.com:4433/auth/code
?response_type=code
&scope=openid%20profile%20email
&client_id=bd7e5e97-afe4-4796-b757-690ddc79ebb2
&state=af0ifjsldkj
&redirect_uri=https://findyourcat.com HTTP/1.1
### request token
POST https://tiger-crunch.com:4433/auth/token
?grant_type=authorization_code
&code=MAu2pqeF0bE5WA2ZwVxNJut7qlnGt6RLUEz-qG2Yf20=
&redirect_uri=https%3A%2F%2Ffindyourcat.com HTTP/1.1
Authorization: Basic bd7e5e97-afe4-4796-b757-690ddc79ebb2:p4ETQXS1qpoMyiSdWhzjF6fz-u7ot2hD47ZQuCGwuG0=
### implicit flow
GET https://tiger-crunch.com:4433/auth/implicit
?response_type=id_token%20token
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
&scope=openid%20profile
&state=af0ifjsldkj
&nonce=n-0S6_WzA2Mj HTTP/1.1
### hybrid flow
GET https://tiger-crunch.com:4433/auth/hybrid
?response_type=code%20id_token
&client_id=s6BhdRkqt3
&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
&scope=openid%20profile%20email
&nonce=n-0S6_WzA2Mj
&state=af0ifjsldkj HTTP/1.1
### refresh token
POST https://tiger-crunch.com:4433/auth/refresh-token
?grant_type=refresh_token
&refresh_token=-bY53NrSLwnYXbTbnBcO5_ib6-KS3L5BvgpB_VclitQ=
&scope=openid%20profile HTTP/1.1
Authorization: Basic bd7e5e97-afe4-4796-b757-690ddc79ebb2:p4ETQXS1qpoMyiSdWhzjF6fz-u7ot2hD47ZQuCGwuG0=
### introspection
POST https://tiger-crunch.com:4433/auth/introspection
?token=NnU97FnBDw5FJEWaeJRRNScVH3o0S5fLP6HsrVSQy8M=
&token_hint=access_token HTTP/1.1
Authorization: Basic bd7e5e97-afe4-4796-b757-690ddc79ebb2:p4ETQXS1qpoMyiSdWhzjF6fz-u7ot2hD47ZQuCGwuG0=
### userinfo
GET https://tiger-crunch.com:4433/userinfo HTTP/1.1
Authorization: Bearer wSThUv-eSR1UPzJ-YCJgnAecpAFIFGkMwL99uY5JS60=access_token
### jwk
GET https://tiger-crunch.com:4433/jwks HTTP/1.1
### logout
POST https://tiger-crunch.com:4433/auth/logout HTTP/1.1
Cookie: __IDT=s%3AeyJ0eXAiOiJqd3QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjdHUlJYY2FIbkJDM0NhOWJKTG1QSnAzeVlQcVR5dVlGbzlKZzljejBPOUkifQ.eyJleHAiOjE2Mjk5NzM2OTAsImlhdCI6MTYyOTM2ODg5MCwic3ViIjoiZmIwNzVkMzUtZmVhMi00ZGZlLWFkMDItOWE1MTZjNTU0ZTg0IiwiaXNzIjoiaHR0cHM6Ly9hdXRoLnRpZ2VyLWNydW5jaC5jb20iLCJhdXRoX3RpbWUiOjE2MjkzNjg4OTB9.ll1MqU5NxCe05bQ3yKR5MO6a6vVuP6WWKFFEN5f0WBkiw6H4DjarSMOtCIMipWDXfjaV4wT5MtN24tM4fVNzqX_iZL-asfvYu1Z7M6ewq4RpMYiVY7eI7QUAZUsTNlzddJsngwcDhQ73zLpdeYIk74tsRU3RRmAX56KzVWHYuDbMWqFGUZxIJurP32rlvQpxER_cqoGp1HoHFBRWqopNnLLJ4TeMgN39Qy5kfZn7X8gVq885WPgudh5HWUURsM4tTrueSyQQtcXfTma_KXvTMCu42MjKtaSoEJgSBTkC1hkN6ecsvP5ILM9b79s_ksCNFl2mcjfiQIyYBe4qyYPJag.HQRNh4gqrgUWk6injak8pIcWt5Uy%2BiytbqYT0zY0oZc; Domain=.tiger-crunch.com; Path=/; Expires=Mon, 19 Jan 1970 20:46:13 GMT; Secure
Cookie: __SID=s%3A5d02f2f4c53c4cc81810e54a46c2610e97a1a3139e56fa4e6181a84986a50ba1.2fff140116c841e495415f4115891d89a3f806eae713c5f6ace6ce9e56330034.UJU5aEw6G%2BAmKXReer7NgOUHYfKM3s%2FZW7qAnjgNc0g; Domain=.tiger-crunch.com; Path=/; Expires=Mon, 19 Jan 1970 20:46:13 GMT; Secure