Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rbrayb/ab553178118273295e1d0f6fb9576785 to your computer and use it in GitHub Desktop.
Save rbrayb/ab553178118273295e1d0f6fb9576785 to your computer and use it in GitHub Desktop.
Postman collection for confidential client via ADFS 4.0 and OpenID Connect / OAuth 2.0
{
"variables": [],
"info": {
"name": "ADFS Public - Confidential",
"_postman_id": "4c0d0604-58e6-35b6-50bc-51c69d779f39",
"description": "Confidential code flow.",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "Confidential",
"description": "",
"item": [
{
"name": "Token Request - Confidential Client",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": "tests['Status Code is 200'] = (responseCode.code === 200);\n"
}
}
],
"request": {
"url": "https://[adfs fqdn]]/adfs/oauth2/token",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-url-form-urlencoded",
"description": ""
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "client_id",
"value": "[client id]",
"type": "text",
"enabled": true
},
{
"key": "scope",
"value": "openid",
"type": "text",
"enabled": true
},
{
"key": "grant_type",
"value": "client_credentials",
"type": "text",
"enabled": true
},
{
"key": "client_secret",
"value": "[client secret]",
"type": "text",
"enabled": true
}
]
},
"description": "The POST request for confidential client. Again you need to fill in your own client_id and client_secret. Then click 'Send'. This will return an access token. You can see what's in the access token by copy / paste into 'jwt.io' in a browser. "
},
"response": []
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment