Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
This topic describes how to consume the EmpowerID REST API with the different OAuth 2.0 flows. Please note that before you can use the framework with your application, you must register that application in EmpowerID. This generates an API Key, Client Secret and Client ID for your application.
The UserInfo endpoint allows your application to return claims about a currently authenticated user. You can find this endpoint from the OAuth Discovery Endpoint.
OAuth Discovery Endpoint
https://<EID Server>/oauth/.well-knowknown/openid-configuration
How to call the UserInfo Endpoint
1. Initiate a request to the EmpowerID User Information endpoint, https://<EID Server>/oauth/v2/userinfo
Code Block |
---|
POST /oauth/v2/userinfo HTTP/1.1 Host: <EID Server> Content-Type: application/x-www-form-urlencoded Cache-Control: no-cache Authorization: Basic base64Encode(<ClientID>:<ClientSecret>) access_token={Your access token} |
Header Parameter | Required/Optional | Description |
---|---|---|
| required | Must be |
| required | Base64 encoded value of ClientID and Client Secret |
Post Body Parameter | Required/Optional | Description |
---|---|---|
| required | Must be the EmpowerID access token |
2. Returns user information in the response
Code Block |
---|
{ "id": "d399765d-fcd7-45c9-913f-2b0c9e65f8b7", "username": "xxxxxxxxxxx", "first_name": " xxxxxxxxxxx ", "last_name": " xxxxxxxxxxx ", "email": " xxxxxxxxxxx", "organization": "Hosting Organization", "business_role_locations": [ "Any Role in Anywhere", "Standard Employee in Anywhere", "All Employee Roles in Anywhere", "All Employee Roles in All Business Locations", "Any Role in All Business Locations", "Default Organization All Roles in All Business Locations", "Standard Employee in All Business Locations", "All Business Roles in Anywhere", "All Business Roles in Default Organization", "All Employee Roles in Default Organization", "Any Role in Default Organization", "Standard Employee in Default Organization" ] } |
Div | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
IN THIS ARTICLE
|