-
Notifications
You must be signed in to change notification settings - Fork 0
oauthservice
Kevin Wang edited this page Mar 2, 2021
·
4 revisions
- Gets a app config
- Response: Status
200
{
"client_id": "<client id>",
"name": "<app name>",
"url": "<app url>",
"redirect_uri": "<app redirect uri>",
"logo": "<app logo preview>",
"time": "<last modified time>",
"creation_time": "<creation time>"
}- Gets a app logo
- Response: Status
200image/png
- Gets all apps
- Header:
Authorization: Bearer <access token>- Only accessible by oauth
- Scope:
gov.user.oauth.app:read - Response: Status
200
{
"apps": [
{
"client_id": "<client id>",
"name": "<app name>",
"url": "<app url>",
"redirect_uri": "<app redirect uri>",
"logo": "<app logo preview>",
"time": "<last modified time>",
"creation_time": "<creation time>"
}
],
}- Gets apps by ids
- Response: Status
200
{
"apps": [
{
"client_id": "<client id>",
"name": "<app name>",
"url": "<app url>",
"redirect_uri": "<app redirect uri>",
"logo": "<app logo preview>",
"time": "<last modified time>",
"creation_time": "<creation time>"
}
],
}- Registers a new app
- Header:
Authorization: Bearer <access token>- Only accessible by oauth
- Scope:
gov.user.oauth.app:write - Request:
{
"name": "<app name>",
"url": "<app url>",
"redirect_uri": "<app redirect uri>"
}- Response: Status
201
{
"client_id": "<client id>",
"key": "<client secret>"
}- Modifies an existing app config
- Header:
Authorization: Bearer <access token>- Only accessible by oauth
- Scope:
gov.user.oauth.app:write - Request:
{
"name": "<app name>",
"url": "<app url>",
"redirect_uri": "<app redirect uri>"
}- Response: Status
204
- Upload an app logo
- Header:
Authorization: Bearer <access token>- Only accessible by oauth
- Scope:
gov.user.oauth.app:write - Request:
HTML Form multipart/form-data
image: <File(image/png, image/jpeg, image/gif)>
- Response: Status
204
- Rotates the client secret
- Header:
Authorization: Bearer <access token>- Only accessible by oauth
- Scope:
gov.user.oauth.app:write - Response: Status
200
{
"client_id": "<client id>",
"key": "<client secret>"
}- Delete an app
- Header:
Authorization: Bearer <access token>- Only accessible by oauth
- Scope:
gov.user.oauth.app:write - Response: Status
204
- Get well-known OpenID configuration
- Get jwks used to sign tokens
- Consents to an authorization request for the auth code openid/oauth flow used by oauth authorization screen
- Header:
Authorization: Bearer <access token>- Only accessible by user
- Scope:
gov.user.oauth.authorize - Request:
{
"client_id": "<client id>",
"scope": "<requested space separated scopes>",
"nonce": "<nonce passed from client>",
"code_challenge": "<code challenge passed from client>",
"code_challenge_method": "<code challenge method passed from client>",
}- Response: Status
200
{
"code": "<code>",
}- Gets a user's oauth app connections
- Header:
Authorization: Bearer <access token>- Only accessible by user
- Scope:
gov.user.oauth.connection:read - Response: Status
200
{
"connections": [
{
"client_id": "<client id>",
"scope": "<space separated scopes>",
"auth_time": "<last auth time>",
"access_time": "<last accessed time>",
"creation_time": "<time of first grant>",
},
],
}- Gets a user's oauth app connection
- Header:
Authorization: Bearer <access token>- Only accessible by user
- Scope:
gov.user.oauth.connection:read - Response: Status
200
{
"client_id": "<client id>",
"scope": "<space separated scopes>",
"auth_time": "<last auth time>",
"access_time": "<last accessed time>",
"creation_time": "<time of first grant>",
}- Deletes a user's oauth app connection
- Header:
Authorization: Bearer <access token>- Only accessible by user
- Scope:
gov.user.oauth.connection:write - Response: Status
204