Last active
September 4, 2018 18:07
-
-
Save lapinek/7941434a4e13b6f713c4300297e19b73 to your computer and use it in GitHub Desktop.
AM 6.0 OAuth 2.0 public "pkce" client with cURL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl 'http://am-service.sample.svc.cluster.local/openam/json/realms/root/realm-config/agents/OAuth2Client/pkce' \ | |
-X PUT \ | |
--data '{ | |
"clientType": "Public", | |
"redirectionUris": ["http://localhost:9999"], | |
"scopes": ["openid"], | |
"responseTypes": ["code"], | |
"tokenEndpointAuthMethod": "client_secret_post", | |
"isConsentImplied": true, | |
"postLogoutRedirectUri": ["http://localhost:9999"] | |
}' \ | |
-H 'Content-Type: application/json' \ | |
-H 'Accept: application/json' \ | |
-H 'Cookie: iPlanetDirectoryPro='$(curl 'http://am-service.sample.svc.cluster.local/openam/json/realms/root/authenticate' \ | |
-X POST \ | |
-H 'X-OpenAM-Username:amadmin' \ | |
-H 'X-OpenAM-Password:password' \ | |
| sed -e 's/^.*"tokenId":"\([^"]*\)".*$/\1/' \ | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment