{
	"info": {
		"_postman_id": "dc6474af-3347-eca5-b819-60bdc1f5ba1c",
		"name": "OpenID Connect - OneLogin API",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Implicit Flow",
			"request": {
				"method": "GET",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": ""
				},
				"url": {
					"raw": "https://openid-connect.onelogin.com/oidc/auth?client_id={{OIDC_client_id}}&nonce={{$guid}}&redirect_uri={{OIDC_redirect_uri}}&response_type=id_token&scope=openid&state=",
					"protocol": "https",
					"host": [
						"openid-connect",
						"onelogin",
						"com"
					],
					"path": [
						"oidc",
						"auth"
					],
					"query": [
						{
							"key": "client_id",
							"value": "{{OIDC_client_id}}"
						},
						{
							"key": "nonce",
							"value": "{{$guid}}"
						},
						{
							"key": "redirect_uri",
							"value": "{{OIDC_redirect_uri}}"
						},
						{
							"key": "response_type",
							"value": "id_token"
						},
						{
							"key": "scope",
							"value": "openid"
						},
						{
							"key": "state",
							"value": ""
						}
					]
				},
				"description": "This GET call is part of the Implicit Flow and must be made via a web browser. The user will be redirected to login at OneLogin and then redirected back again to the registered redirect_uri."
			},
			"response": []
		},
		{
			"name": "Authorization Code Flow",
			"request": {
				"method": "GET",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": ""
				},
				"url": {
					"raw": "https://openid-connect.onelogin.com/oidc/auth?client_id={{OIDC_client_id}}&nonce={{$guid}}&redirect_uri={{OIDC_redirect_uri}}&response_type=code&scope=openid&state=",
					"protocol": "https",
					"host": [
						"openid-connect",
						"onelogin",
						"com"
					],
					"path": [
						"oidc",
						"auth"
					],
					"query": [
						{
							"key": "client_id",
							"value": "{{OIDC_client_id}}"
						},
						{
							"key": "nonce",
							"value": "{{$guid}}"
						},
						{
							"key": "redirect_uri",
							"value": "{{OIDC_redirect_uri}}"
						},
						{
							"key": "response_type",
							"value": "code"
						},
						{
							"key": "scope",
							"value": "openid"
						},
						{
							"key": "state",
							"value": ""
						}
					]
				},
				"description": "This GET call is part of the Authentication Flow and must be made via a web browser. The user will be redirected to login at OneLogin and then redirected back again to the registered redirect_uri."
			},
			"response": []
		},
		{
			"name": "Get Access Token via Authorization Code",
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "username",
							"value": "{{OIDC_client_id}}",
							"type": "string"
						},
						{
							"key": "password",
							"value": "{{OIDC_client_secret}}",
							"type": "string"
						},
						{
							"key": "saveHelperData",
							"value": true,
							"type": "boolean"
						},
						{
							"key": "showPassword",
							"value": false,
							"type": "boolean"
						}
					]
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/x-www-form-urlencoded"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "code",
							"value": "{{OIDC_authorization_code}}",
							"type": "text"
						},
						{
							"key": "redirect_uri",
							"value": "{{OIDC_redirect_uri}}",
							"type": "text"
						},
						{
							"key": "grant_type",
							"value": "authorization_code",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "https://openid-connect.onelogin.com/oidc/token",
					"protocol": "https",
					"host": [
						"openid-connect",
						"onelogin",
						"com"
					],
					"path": [
						"oidc",
						"token"
					]
				}
			},
			"response": []
		},
		{
			"name": "Client Credentials Grant",
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "password",
							"value": "{{OIDC_client_secret}}",
							"type": "string"
						},
						{
							"key": "username",
							"value": "{{OIDC_client_id}}",
							"type": "string"
						},
						{
							"key": "saveHelperData",
							"value": true,
							"type": "boolean"
						},
						{
							"key": "showPassword",
							"value": false,
							"type": "boolean"
						}
					]
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/x-www-form-urlencoded"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "grant_type",
							"value": "client_credentials",
							"description": "",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "https://openid-connect.onelogin.com/oidc/token",
					"protocol": "https",
					"host": [
						"openid-connect",
						"onelogin",
						"com"
					],
					"path": [
						"oidc",
						"token"
					]
				}
			},
			"response": []
		},
		{
			"name": "Password Grant",
			"event": [
				{
					"listen": "test",
					"script": {
						"id": "618a8efd-0461-4d12-abc4-d09a6f39c975",
						"type": "text/javascript",
						"exec": [
							"var jsonData = JSON.parse(responseBody);",
							"postman.setEnvironmentVariable(\"OIDC_access_token\", jsonData.access_token);",
							"postman.setEnvironmentVariable(\"OIDC_refresh_token\", jsonData.refreshToken);"
						]
					}
				}
			],
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "username",
							"value": "{{OIDC_client_id}}",
							"type": "string"
						},
						{
							"key": "password",
							"value": "{{OIDC_client_secret}}",
							"type": "string"
						},
						{
							"key": "saveHelperData",
							"type": "any"
						},
						{
							"key": "showPassword",
							"value": false,
							"type": "boolean"
						}
					]
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/x-www-form-urlencoded"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "username",
							"value": "{{username}}",
							"type": "text"
						},
						{
							"key": "password",
							"value": "{{password}}",
							"type": "text"
						},
						{
							"key": "client_id",
							"value": "{{OIDC_client_id}}",
							"type": "text"
						},
						{
							"key": "grant_type",
							"value": "password",
							"type": "text"
						},
						{
							"key": "scope",
							"value": "openid profile email",
							"type": "text"
						},
						{
							"key": "response_type",
							"value": "id_token",
							"description": "",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "https://openid-connect.onelogin.com/oidc/token",
					"protocol": "https",
					"host": [
						"openid-connect",
						"onelogin",
						"com"
					],
					"path": [
						"oidc",
						"token"
					]
				}
			},
			"response": []
		},
		{
			"name": "Introspect Token",
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "username",
							"value": "{{OIDC_client_id}}",
							"type": "string"
						},
						{
							"key": "password",
							"value": "{{OIDC_client_secret}}",
							"type": "string"
						},
						{
							"key": "saveHelperData",
							"value": true,
							"type": "boolean"
						},
						{
							"key": "showPassword",
							"value": false,
							"type": "boolean"
						}
					]
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/x-www-form-urlencoded"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "token",
							"value": "{{OIDC_access_token}}",
							"type": "text"
						},
						{
							"key": "token_type_hint",
							"value": "access_token",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "https://openid-connect.onelogin.com/oidc/token/introspection",
					"protocol": "https",
					"host": [
						"openid-connect",
						"onelogin",
						"com"
					],
					"path": [
						"oidc",
						"token",
						"introspection"
					]
				}
			},
			"response": []
		},
		{
			"name": "Refresh Token",
			"event": [
				{
					"listen": "test",
					"script": {
						"id": "134f73df-3282-4920-8c40-91f51d238a68",
						"type": "text/javascript",
						"exec": [
							"var jsonData = JSON.parse(responseBody);",
							"postman.setEnvironmentVariable(\"OIDC_access_token\", jsonData.access_token);",
							"postman.setEnvironmentVariable(\"OIDC_refresh_token\", jsonData.refresh_token);"
						]
					}
				}
			],
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "username",
							"value": "{{OIDC_client_id}}",
							"type": "string"
						},
						{
							"key": "password",
							"value": "{{OIDC_client_secret}}",
							"type": "string"
						},
						{
							"key": "saveHelperData",
							"value": true,
							"type": "boolean"
						},
						{
							"key": "showPassword",
							"value": false,
							"type": "boolean"
						}
					]
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/x-www-form-urlencoded"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "refresh_token",
							"value": "{{OIDC_refresh_token}}",
							"type": "text"
						},
						{
							"key": "grant_type",
							"value": "refresh_token",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "https://openid-connect.onelogin.com/oidc/token",
					"protocol": "https",
					"host": [
						"openid-connect",
						"onelogin",
						"com"
					],
					"path": [
						"oidc",
						"token"
					]
				}
			},
			"response": []
		},
		{
			"name": "Revoke Token",
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "username",
							"value": "{{OIDC_client_id}}",
							"type": "string"
						},
						{
							"key": "password",
							"value": "{{OIDC_client_secret}}",
							"type": "string"
						},
						{
							"key": "saveHelperData",
							"value": true,
							"type": "boolean"
						},
						{
							"key": "showPassword",
							"value": false,
							"type": "boolean"
						}
					]
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/x-www-form-urlencoded"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "token",
							"value": "{{OIDC_access_token}}",
							"type": "text"
						},
						{
							"key": "token_type_hint",
							"value": "access_token",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "https://openid-connect.onelogin.com/oidc/token/revocation",
					"protocol": "https",
					"host": [
						"openid-connect",
						"onelogin",
						"com"
					],
					"path": [
						"oidc",
						"token",
						"revocation"
					]
				}
			},
			"response": []
		},
		{
			"name": "Get Provider Configuration Metadata",
			"request": {
				"method": "GET",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": ""
				},
				"url": {
					"raw": "https://openid-connect.onelogin.com/oidc/.well-known/openid-configuration",
					"protocol": "https",
					"host": [
						"openid-connect",
						"onelogin",
						"com"
					],
					"path": [
						"oidc",
						".well-known",
						"openid-configuration"
					]
				}
			},
			"response": []
		},
		{
			"name": "Get User Info",
			"request": {
				"auth": {
					"type": "bearer",
					"bearer": [
						{
							"key": "token",
							"value": "{{OIDC_access_token}}",
							"type": "string"
						}
					]
				},
				"method": "GET",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": ""
				},
				"url": {
					"raw": "https://openid-connect.onelogin.com/oidc/me",
					"protocol": "https",
					"host": [
						"openid-connect",
						"onelogin",
						"com"
					],
					"path": [
						"oidc",
						"me"
					]
				},
				"description": "Returns user information associated with the session"
			},
			"response": []
		}
	]
}