-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathOauth2.http
More file actions
44 lines (36 loc) · 1.1 KB
/
Oauth2.http
File metadata and controls
44 lines (36 loc) · 1.1 KB
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
# For a quick start check out our HTTP Requests collection (Tools|HTTP Client|Open HTTP Requests Collection).
#
# Following HTTP Request Live Templates are available:
# * 'gtrp' and 'gtr' create a GET request with or without query parameters;
# * 'ptr' and 'ptrp' create a POST request with a simple or parameter-like body;
# * 'mptr' and 'fptr' create a POST request to submit a form with a text or file field (multipart/form-data);
# ---------------- spring oatuh2 start ---------------
###
POST http://{{JanloongDoo}}/oauth/token
Accept: */*
Cache-Control: no-cache
Content-Type: application/json
{
"client_secret": "secret",
"client_id": "janloongdoo",
"grant_type": "password",
"username": "ddd",
"password": "ddd"
// "scop": "read"
}
###
POST http://localhost:8080/oauth/token
Accept: */*
Cache-Control: no-cache
Content-Type: application/json
{
"username": {{username}},
"password": {{password}}
}
> {%
client.test("Request executed successfully", function() {
client.assert(response.status === 200, "Response status is not 200");
});
%}
###
# ---------------- spring oatuh2 end ---------------