-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
68 lines (58 loc) · 2.95 KB
/
notes.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
63
64
65
66
67
68
#############################################################
# Test directly the Hydra Admin APIs
#############################################################
# 1 - Create a new CLIENT (with Hydra Admin 4445)
http POST http://af6cfeff122cb4299ac3b06d1d1eb60c-1350578280.eu-west-3.elb.amazonaws.com:4445/admin/clients \
client_secret=mysecret \
client_name="My App" \
"grant_types[]=client_credentials" \
"grant_types[]=authorization_code" \
"grant_types[]=refresh_token" \
token_endpoint_auth_method=client_secret_basic \
"response_types[]=token" \
"response_types[]=id_token" \
"response_types[]=code" \
access_token_strategy=jwt \
scope=openid \
"redirect_uris[]=https://my-app.com/callback"
# 2 - REFRESH the CLIENT_SECRET of a CLIENT (with Hydra Admin 4445)
http -v PATCH http://af6cfeff122cb4299ac3b06d1d1eb60c-1350578280.eu-west-3.elb.amazonaws.com:4445/admin/clients/CLIENT_ID_TO-BE-REPLACED \
--raw='[{
"op": "replace",
"path": "/client_secret",
"value": "878c8893-a98a-4a4b-821b-385feb27c3ff"
}]'
# 3 - DELETE a CLIENT (with Hydra Admin 4445)
# DELETE a CLIENT
http DELETE http://af6cfeff122cb4299ac3b06d1d1eb60c-1350578280.eu-west-3.elb.amazonaws.com:4445/admin/clients/CLIENT_ID_TO-BE-REPLACED
# X:
# list of 'client's (with Hydra Admin 4445)
http http://af6cfeff122cb4299ac3b06d1d1eb60c-1350578280.eu-west-3.elb.amazonaws.com:4445/admin/clients
# client Detail (with Hydra Admin 4445)
http http://af6cfeff122cb4299ac3b06d1d1eb60c-1350578280.eu-west-3.elb.amazonaws.com:4445/admin/clients/CLIENT_ID_TO-BE-REPLACED
# Create token (with Public Hydra 4444)
http -f -a CLIENT_ID_TO-BE-REPLACED:CLIENT_SECRET_TO-BE-REPLACED POST http://a90bd92b8346147d8aee87282533fe3c-384557266.eu-west-3.elb.amazonaws.com:4444/oauth2/token \
grant_type=client_credentials
scope=openid
###############################################################
# Test locally the DCR Bridge (which calls the Hydra Admin API)
###############################################################
# 0a - Get the 'x-api-key' from Konnect: Menu DevPortal / Settings / Application Setup, Select Idp=HTTP and click on Generate token (DCR)
# 0b - Start locally the DCR Bridge
yarn start
# 1 - Create a new CLIENT
http POST :3000/ redirect_uris=http://localhost \
x-api-key:tB5915uprx3N \
client_name=jegvscode1 \
application_description=\
grant_types\[\]=authorization_code \
grant_types\[\]=refresh_token \
grant_types\[\]=client_credentials \
grant_types\[\]=implicit \
token_endpoint_auth_method=client_secret_jwt \
portal_id=02696642-6274-469d-b0d1-1bfdd1adbb40 \
organization_id=1ac2a6d7-cc38-458d-8573-0f9868f8ac6c
# 2 - REFRESH a CLIENT_SECRET of a CLIENT
http POST :3000/CLIENT_ID_TO-BE-REPLACED/new-secret x-api-key:tB5915uprx3N
# 3 - DELETE a CLIENT
http DELETE :3000/CLIENT_ID_TO-BE-REPLACED x-api-key:tB5915uprx3N