Skip to content

Instantly share code, notes, and snippets.

@liyangau
Last active December 15, 2021 13:06
Show Gist options
  • Save liyangau/47cadc868dc1fdfab81309e5e5f8cac7 to your computer and use it in GitHub Desktop.
Save liyangau/47cadc868dc1fdfab81309e5e5f8cac7 to your computer and use it in GitHub Desktop.
A insomnia collection for Keycloak auth flows
{
"_type": "export",
"__export_format": 4,
"__export_date": "2021-12-15T13:04:22.319Z",
"__export_source": "insomnia.desktop.app:v2021.6.0",
"resources": [
{
"_id": "req_a2ee5a17e658458cb17d5765ccf75a10",
"parentId": "wrk_6061d5e89a47437891ada2e1b001522e",
"modified": 1639573436076,
"created": 1639565039124,
"url": "",
"name": "authorization_code",
"description": "",
"method": "GET",
"body": {},
"parameters": [
{
"id": "pair_5729559a749449f08a1f80126e2dd944",
"name": "response_type",
"value": "code",
"description": ""
},
{
"id": "pair_98082566172241b5991379b93ecaa38f",
"name": "client_id",
"value": "{{ _.client_id }}",
"description": ""
},
{
"id": "pair_f6c54640ee9b4aabb042e16e5faabd35",
"name": "client_secret",
"value": "{{ _.client_secret }}",
"description": ""
},
{
"id": "pair_fa829c0a344d4020aa1579b10119e18b",
"name": "redirect_uri",
"value": "http://localhost/callback",
"description": ""
},
{
"id": "pair_9636e0224cb54b0e95d5c9c4d49e0198",
"name": "scope",
"value": "openid",
"description": ""
}
],
"headers": [],
"authentication": {
"type": "oauth2",
"grantType": "authorization_code",
"authorizationUrl": "https://{{ _.host }}/auth/realms/{{ _.realm }}/protocol/openid-connect/auth",
"clientId": "{{ _.client_id }}",
"clientSecret": "{{ _.client_secret }}",
"redirectUrl": "http://localhost/callback",
"usePkce": true,
"accessTokenUrl": "https://{{ _.host }}/auth/realms/{{ _.realm }}/protocol/openid-connect/token",
"scope": "openid"
},
"metaSortKey": -1000000037.5,
"isPrivate": false,
"settingStoreCookies": true,
"settingSendCookies": true,
"settingDisableRenderRequestBody": false,
"settingEncodeUrl": true,
"settingRebuildPath": true,
"settingFollowRedirects": "global",
"_type": "request"
},
{
"_id": "wrk_6061d5e89a47437891ada2e1b001522e",
"parentId": null,
"modified": 1639556944602,
"created": 1639556944602,
"name": "keycloak",
"description": "",
"scope": "collection",
"_type": "workspace"
},
{
"_id": "req_20941e950e2349549bc0d604127d546b",
"parentId": "wrk_6061d5e89a47437891ada2e1b001522e",
"modified": 1639573346435,
"created": 1639557029508,
"url": "https://{{ _.host }}/auth/realms/{{ _.realm }}/protocol/openid-connect/token",
"name": "client_credentials",
"description": "",
"method": "POST",
"body": {
"mimeType": "application/x-www-form-urlencoded",
"params": [
{
"description": "",
"id": "pair_58a96cf4389f4ef19b6c0341e7208cf4",
"name": "grant_type",
"value": "client_credentials"
},
{
"description": "",
"id": "pair_8b0b33027dd44efd8eb6c494be6a17ab",
"name": "client_id",
"value": "{{ _.client_id }}"
},
{
"description": "",
"disabled": false,
"id": "pair_df7f259e8c6d449a9842b4a626849b28",
"name": "client_secret",
"value": "{{ _.client_secret }}"
}
]
},
"parameters": [],
"headers": [
{
"id": "pair_505a2ec656234fc1872e293a1a7d1183",
"name": "Content-Type",
"value": "application/x-www-form-urlencoded"
}
],
"authentication": {},
"metaSortKey": -1000000025,
"isPrivate": false,
"settingStoreCookies": true,
"settingSendCookies": true,
"settingDisableRenderRequestBody": false,
"settingEncodeUrl": true,
"settingRebuildPath": true,
"settingFollowRedirects": "global",
"_type": "request"
},
{
"_id": "req_f0554312b1ed488cbad253bf5c124572",
"parentId": "wrk_6061d5e89a47437891ada2e1b001522e",
"modified": 1639573337042,
"created": 1639557029510,
"url": "https://{{ _.host }}/auth/realms/{{ _.realm }}/protocol/openid-connect/token/introspect",
"name": "introspection",
"description": "",
"method": "POST",
"body": {
"mimeType": "application/x-www-form-urlencoded",
"params": [
{
"description": "",
"disabled": false,
"id": "pair_d423e07cc7854634b5e2c12c41b4c0c8",
"name": "client_id",
"value": "{{ _.client_id }}"
},
{
"description": "",
"disabled": false,
"id": "pair_962b42d9595c43858213355a03c8fd49",
"name": "client_secret",
"value": "{{ _.client_secret }}"
},
{
"description": "",
"id": "pair_da7b9f19e9474fbca5960aef34f62825",
"name": "token",
"value": "{% response 'body', 'req_a65757f0eecd4251919b0a3e784d86f5', 'b64::JC5hY2Nlc3NfdG9rZW4=::46b', 'always', 60 %}",
"disabled": false
},
{
"description": "",
"id": "pair_ea58560e16c1410fbd8e58b417dfc355",
"name": "grant_type",
"value": "introspect"
},
{
"id": "pair_2422ffd2dfc34738afb312e8a5403e88",
"name": "token_type_hint",
"value": "access_token",
"description": "",
"disabled": true
}
]
},
"parameters": [],
"headers": [
{
"id": "pair_505a2ec656234fc1872e293a1a7d1183",
"name": "Content-Type",
"value": "application/x-www-form-urlencoded"
}
],
"authentication": {
"type": "basic",
"useISO88591": false,
"disabled": false,
"username": "{{ _.client_id }}",
"password": "{{ _.client_secret }}"
},
"metaSortKey": -1000000006.25,
"isPrivate": false,
"settingStoreCookies": true,
"settingSendCookies": true,
"settingDisableRenderRequestBody": false,
"settingEncodeUrl": true,
"settingRebuildPath": true,
"settingFollowRedirects": "global",
"_type": "request"
},
{
"_id": "req_557bb0af84a14548afaaf7a962981795",
"parentId": "wrk_6061d5e89a47437891ada2e1b001522e",
"modified": 1639573336444,
"created": 1639557029507,
"url": "https://{{ _.host }}/auth/realms/{{ _.realm }}/protocol/openid-connect/token",
"name": "password",
"description": "",
"method": "POST",
"body": {
"mimeType": "application/x-www-form-urlencoded",
"params": [
{
"description": "",
"id": "pair_58a96cf4389f4ef19b6c0341e7208cf4",
"name": "grant_type",
"value": "password"
},
{
"description": "",
"id": "pair_8b0b33027dd44efd8eb6c494be6a17ab",
"name": "client_id",
"value": "{{ _.client_id }}"
},
{
"description": "",
"disabled": false,
"id": "pair_df7f259e8c6d449a9842b4a626849b28",
"name": "client_secret",
"value": "{{ _.client_secret }}"
},
{
"description": "",
"id": "pair_fae3837ccc724c5088827e1ee1bc9476",
"name": "username",
"value": "demo"
},
{
"description": "",
"id": "pair_da46199c605e4480a2ae9e4dae6b1a68",
"name": "password",
"value": "demo"
},
{
"description": "",
"disabled": false,
"id": "pair_da5d9155791048ed94bf324af5631946",
"name": "scope",
"value": "openid"
}
]
},
"parameters": [],
"headers": [
{
"id": "pair_505a2ec656234fc1872e293a1a7d1183",
"name": "Content-Type",
"value": "application/x-www-form-urlencoded"
}
],
"authentication": {},
"metaSortKey": -1000000003.90625,
"isPrivate": false,
"settingStoreCookies": true,
"settingSendCookies": true,
"settingDisableRenderRequestBody": false,
"settingEncodeUrl": true,
"settingRebuildPath": true,
"settingFollowRedirects": "global",
"_type": "request"
},
{
"_id": "req_b7256de6a5334db796f46f8cb5993f80",
"parentId": "wrk_6061d5e89a47437891ada2e1b001522e",
"modified": 1639573343873,
"created": 1639557029513,
"url": "https://{{ _.host }}/auth/realms/{{ _.realm }}/protocol/openid-connect/token",
"name": "refresh_token",
"description": "",
"method": "POST",
"body": {
"mimeType": "application/x-www-form-urlencoded",
"params": [
{
"description": "",
"id": "pair_58a96cf4389f4ef19b6c0341e7208cf4",
"name": "grant_type",
"value": "refresh_token"
},
{
"description": "",
"id": "pair_8b0b33027dd44efd8eb6c494be6a17ab",
"name": "client_id",
"value": "{{ _.client_id }}"
},
{
"description": "",
"disabled": false,
"id": "pair_df7f259e8c6d449a9842b4a626849b28",
"name": "client_secret",
"value": "{{ _.client_secret }}"
},
{
"description": "",
"id": "pair_d4608dd7acab4972bda7c3f9b35f4ea0",
"name": "refresh_token",
"value": "{% response 'body', 'req_557bb0af84a14548afaaf7a962981795', 'b64::JC5yZWZyZXNoX3Rva2Vu::46b', 'no-history', 60 %}"
}
]
},
"parameters": [],
"headers": [
{
"id": "pair_505a2ec656234fc1872e293a1a7d1183",
"name": "Content-Type",
"value": "application/x-www-form-urlencoded"
}
],
"authentication": {},
"metaSortKey": -1000000001.5625,
"isPrivate": false,
"settingStoreCookies": true,
"settingSendCookies": true,
"settingDisableRenderRequestBody": false,
"settingEncodeUrl": true,
"settingRebuildPath": true,
"settingFollowRedirects": "global",
"_type": "request"
},
{
"_id": "req_e3aa5dc8b7ca4fc490d7a60780d79d8f",
"parentId": "wrk_6061d5e89a47437891ada2e1b001522e",
"modified": 1639573344654,
"created": 1639557029515,
"url": "https://{{ _.host }}/auth/realms/{{ _.realm }}/protocol/openid-connect/token",
"name": "redeem_code",
"description": "",
"method": "POST",
"body": {
"mimeType": "application/x-www-form-urlencoded",
"params": [
{
"description": "",
"id": "pair_58a96cf4389f4ef19b6c0341e7208cf4",
"name": "grant_type",
"value": "authorization_code"
},
{
"description": "",
"id": "pair_fae3837ccc724c5088827e1ee1bc9476",
"name": "redirect_uri",
"value": "http://localhost/callback",
"disabled": false
},
{
"description": "",
"id": "pair_da46199c605e4480a2ae9e4dae6b1a68",
"name": "code",
"value": "{% prompt 'authorization_code', 'Redeem Code', '', '', false, false %}",
"disabled": false
},
{
"id": "pair_b5e6f8e835cd452cb6848f5dae9580de",
"name": "client_id",
"value": "{{ _.client_id }}",
"description": ""
},
{
"id": "pair_bd933a189ab14f60b61bf1f427ac4b6b",
"name": "client_secret",
"value": "{{ _.client_secret }}",
"description": ""
}
]
},
"parameters": [],
"headers": [
{
"id": "pair_505a2ec656234fc1872e293a1a7d1183",
"name": "Content-Type",
"value": "application/x-www-form-urlencoded"
}
],
"authentication": {},
"metaSortKey": -999999901.5625,
"isPrivate": false,
"settingStoreCookies": true,
"settingSendCookies": true,
"settingDisableRenderRequestBody": false,
"settingEncodeUrl": true,
"settingRebuildPath": true,
"settingFollowRedirects": "global",
"_type": "request"
},
{
"_id": "req_a838d7f04a79466f8c4a82bea5c65b9c",
"parentId": "wrk_6061d5e89a47437891ada2e1b001522e",
"modified": 1639573334626,
"created": 1639557029516,
"url": "https://{{ _.host }}/auth/realms/{{ _.realm }}/protocol/openid-connect/userinfo",
"name": "userinfo",
"description": "",
"method": "GET",
"body": {},
"parameters": [],
"headers": [],
"authentication": {
"type": "bearer",
"token": "{% response 'body', 'req_557bb0af84a14548afaaf7a962981795', 'b64::JC5hY2Nlc3NfdG9rZW4=::46b', 'no-history', 60 %}"
},
"metaSortKey": -999999876.5625,
"isPrivate": false,
"settingStoreCookies": true,
"settingSendCookies": true,
"settingDisableRenderRequestBody": false,
"settingEncodeUrl": true,
"settingRebuildPath": true,
"settingFollowRedirects": "global",
"_type": "request"
},
{
"_id": "env_4e8ae68d83b1d167481ab4ed287feb869f89281c",
"parentId": "wrk_6061d5e89a47437891ada2e1b001522e",
"modified": 1639573299052,
"created": 1639556944617,
"name": "Base Environment",
"data": {
"host": "",
"realm": "",
"client_id": "",
"client_secret": ""
},
"dataPropertyOrder": {
"&": [
"host",
"realm",
"client_id",
"client_secret"
]
},
"color": null,
"isPrivate": false,
"metaSortKey": 1639556944617,
"_type": "environment"
},
{
"_id": "jar_4e8ae68d83b1d167481ab4ed287feb869f89281c",
"parentId": "wrk_6061d5e89a47437891ada2e1b001522e",
"modified": 1639573448064,
"created": 1639556944618,
"name": "Default Jar",
"cookies": [],
"_type": "cookie_jar"
},
{
"_id": "spc_e95ac55303294e83b12400ddf208c8ba",
"parentId": "wrk_6061d5e89a47437891ada2e1b001522e",
"modified": 1639556944610,
"created": 1639556944610,
"fileName": "keycloak",
"contents": "",
"contentType": "yaml",
"_type": "api_spec"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment