-
Notifications
You must be signed in to change notification settings - Fork 0
/
curl참고.txt
62 lines (34 loc) · 3.5 KB
/
curl참고.txt
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
http://localhost:8080/oauth/authorize?client_id=clientapp&redirect_uri=http://localhost:9000/callback&response_type=code&scope=read_profile
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
curl -X POST --user clientapp:123456 http://localhost:8080/oauth/token -H "content-type: application/x-www-form-urlencoded" -d "code=NsabEy&grant_type=authorization_code&redirect_uri=http%3A%2F%2Flocalhost%3A9000%2Fcallback&scope=read_profile"
curl -X GET http://localhost:8080/api/profile -H "authorization: Bearer 2af01605-f34d-4172-bdee-08ec671899fd"
================================================================
implicit 타입
http://localhost:8080/oauth/authorize?client_id=clientapp&redirect_uri=http://localhost:9000/callback&response_type=token&scope=read_profile&state=xyz
curl -X GET http://localhost:8080/api/profile -H "authorization: Bearer efce5f69-d69a-442b-9032-fb4e353349e7"
================================================================
password-server
curl -X POST --user clientapp:123456 http://localhost:8080/oauth/token -H "accept: application/json" -H "application/x-www-form-urlencoded" -d "grant_type=password&username=adolfo&password=123&scope=read_profile"
curl -X GET http://localhost:8080/api/profile -H "authorization: Bearer 5f411fa2-0293-4faf-8b27-15f38b4e1737"
================================================================
client-credential-server
curl -X POST "http://localhost:8080/oauth/token" --user clientadmin:123 -d "grant_type=client_credentials&scope=admin"
curl "http://localhost:8080/api/users" -H "Authorization: Bearer 498f6843-abab-4a62-9b41-e47a2d4ab9f8"
curl "http://localhost:8080/user" --user adolfo:123
================================================================
refresh-server
curl -X POST --user clientapp:123456 http://localhost:8080/oauth/token -H "accept: application/json" -H "content-type: application/x-www-form-urlencoded" -d "grant_type=password&username=adolfo&password=123&scope=read_profile"
curl -X GET http://localhost:8080/api/profile -H "Authorization: Bearer e6a65c6f-7bd9-4327-a387-a5c967ae5bc8"
curl -X POST --user clientapp:123456 http://localhost:8080/oauth/token -H "content-type: application/x-www-form-urlencoded" -d "grant_type=refresh_token&refresh_token=c3eaf527-960c-4ccb-af2e-d52fa81d6ee6&scope=read_profile"
================================================================
rdbm-server
http://localhost:8080/oauth/authorize?client_id=clientapp&redirect_uri=http://localhost:9000/callback&response_type=code&scope=read_profile
curl -X POST --user clientapp:123456 http://localhost:8080/oauth/token -H "content-type: application/x-www-form-urlencoded" -d "code=AscchP&grant_type=authorization_code&redirect_uri=http://localhost:9000/callback&scope=read_profile"
================================================================
redis-server
curl -X POST --user clientapp:123456 http://localhost:8080/oauth/token -H "accept: application/json" -H "content-type: application/x-www-form-urlencoded" -d "grant_type=password&username=adolfo&password=123&scope=read_profile"
================================================================
separated-oauthprovider
curl -X POST --user clientapp:123456 http://localhost:8080/oauth/token -H "accept: application/json" -H "content-type: application/x-www-form-urlencoded" -d "grant_type=password&username=adolfo&password=123&scope=read_profile"
curl -X GET http://localhost:8081/api/profile -H "authorization: Bearer ea22963b-3c7f-44f1-acda-681ba03d4548"
================================================================