OAuth APIs
From Social ID Developers
(Difference between revisions)
(→Token Endpoint) |
|||
(8 intermediate revisions by one user not shown) | |||
Line 25: | Line 25: | ||
| provider_authorization_code | | provider_authorization_code | ||
| Generates a new Login User Token given an OAuth2 authorization code issued by an external provider. | | Generates a new Login User Token given an OAuth2 authorization code issued by an external provider. | ||
+ | |- | ||
+ | | [[POST /oauth/ldap_credentials_token | POST /oauth/token]] | ||
+ | | ldap_credentials | ||
+ | | Generates a new Login User Token given LDAP credentials. | ||
|- | |- | ||
| [[POST /oauth/token_user_id | POST /oauth/token]] | | [[POST /oauth/token_user_id | POST /oauth/token]] | ||
Line 37: | Line 41: | ||
| refresh_token | | refresh_token | ||
| Refreshes an access token, generating a new one. | | Refreshes an access token, generating a new one. | ||
+ | |} | ||
+ | |||
+ | == Token Revocation Endpoint == | ||
+ | |||
+ | {| | ||
+ | ! align="left" width="300px"| Resource | ||
+ | ! align="left"| Description | ||
+ | |- | ||
+ | | [[POST /oauth/revoke | POST /oauth/revoke]] | ||
+ | | Revokes an access token or a refresh token. | ||
|} | |} | ||
Line 54: | Line 68: | ||
| Updates username/e-mail/password information of an user. | | Updates username/e-mail/password information of an user. | ||
|- | |- | ||
− | | [[POST oauth/login/users/ | + | | [[POST oauth/login/users/reset_password/email | POST login/users/reset_password/email]] |
| Sends a reset password e-mail for a user given its username or e-mail. | | Sends a reset password e-mail for a user given its username or e-mail. | ||
|- | |- | ||
Line 81: | Line 95: | ||
|- | |- | ||
| [[POST oauth/push_notifications/devices | POST push_notifications/devices]] | | [[POST oauth/push_notifications/devices | POST push_notifications/devices]] | ||
− | | Adds a new device to the | + | | Adds a new device to the Login App devices list. |
|- | |- | ||
| [[POST oauth/login/user/push_notifications/devices | POST login/user/push_notifications/devices]] | | [[POST oauth/login/user/push_notifications/devices | POST login/user/push_notifications/devices]] | ||
− | | Relates a device with a | + | | Relates a device with a Login User. |
|} | |} |
Latest revision as of 18:46, 18 May 2022
Some CoffeeBean APIs require OAuth 2.0 authentication instead of HTTP Basic.
In order to access them one needs first to request an access token through the Token Endpoint. Each access token has its own scope and allows a certain set of APIs.
At the moment, OAuth authenticated APIs require either Login User Token or Login App Token authentication. See Token Endpoint below to instructions on how to get each kind of token.
Please, refer to https://tools.ietf.org/html/rfc6749 if you are not familiar with the OAuth 2.0 protocol.
Contents |
Token Endpoint
Resource | Grant Type | Description |
---|---|---|
POST /oauth/token | password | Generates a new Login User Token given a combination of username/email_address and password. |
POST /oauth/token | provider_credentials | Generates a new Login User Token given an OAuth token issued by an external provider. |
POST /oauth/token | provider_authorization_code | Generates a new Login User Token given an OAuth2 authorization code issued by an external provider. |
POST /oauth/token | ldap_credentials | Generates a new Login User Token given LDAP credentials. |
POST /oauth/token | user_id | Generates a new Login User Token given a user id. |
POST /oauth/token | client_credentials | Generates a new Login App Token. |
POST /oauth/token | refresh_token | Refreshes an access token, generating a new one. |
Token Revocation Endpoint
Resource | Description |
---|---|
POST /oauth/revoke | Revokes an access token or a refresh token. |
Users
Resource | Description |
---|---|
GET login/user | Returns user information, including his/her profile (if required). |
POST login/users | Creates a new user manually, given username and/or e-mail. |
PUT login/user | Updates username/e-mail/password information of an user. |
POST login/users/reset_password/email | Sends a reset password e-mail for a user given its username or e-mail. |
PUT login/user/unlock | Unlocks a user for login. |
User Data
Resource | Description |
---|---|
GET login/user/data | Returns user custom profile information. |
PUT login/user/data | Updates user custom profile information. |
Devices
Resource | Description |
---|---|
POST push_notifications/devices | Adds a new device to the Login App devices list. |
POST login/user/push_notifications/devices | Relates a device with a Login User. |