Providers

Retrieve a provider

get

Retrieve details of a specific OAuth provider by slug.

Authorizations
Path parameters
slugstringRequired

The slug of the resource.

Example: obj_slug
Responses
200
Provider details.
application/json
get
GET /api/v1/oauth/{slug}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "name": "text",
  "slug": "text",
  "icon": "https://example.com",
  "client_id": "text",
  "client_secret": "text",
  "authorization_url": "https://example.com",
  "token_url": "https://example.com",
  "userinfo_url": "https://example.com",
  "whitelist": [
    "https://example.com"
  ],
  "provider": "azure",
  "kwargs": {},
  "is_active": true
}

Update a provider

put

Update the details of an existing OAuth provider. Only superusers can perform this action.

Authorizations
Path parameters
slugstringRequired

The slug of the resource.

Example: obj_slug
Body
namestring · max: 256Optional

The name of the OAuth provider.

slugstring · max: 256Optional

A unique slug identifier for the provider.

iconstring · uriOptional

URL of the provider's icon.

client_idstring · max: 256Optional

Client ID for the OAuth provider.

client_secretstring · max: 512Optional

Client secret for the OAuth provider.

authorization_urlstring · uri · max: 512Optional

The URL for the authorization endpoint of the provider.

token_urlstring · uri · max: 512Optional

The URL for the token endpoint of the provider.

userinfo_urlstring · uri · max: 512Optional

The URL for the user information endpoint of the provider.

whiteliststring · uri[]Optional

A list of URLs whitelisted for the provider.

providerstring · enum · max: 32Optional

The type of provider. Possible values: azure, github, google, turkcell.

Possible values:
kwargsobjectOptional

Additional parameters for the provider.

is_activebooleanOptional

Indicates whether the provider is active.

Responses
200
Provider updated successfully.
application/json
put
PUT /api/v1/oauth/{slug}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 297

{
  "name": "text",
  "slug": "text",
  "icon": "https://example.com",
  "client_id": "text",
  "client_secret": "text",
  "authorization_url": "https://example.com",
  "token_url": "https://example.com",
  "userinfo_url": "https://example.com",
  "whitelist": [
    "https://example.com"
  ],
  "provider": "azure",
  "kwargs": {},
  "is_active": true
}
{
  "name": "text",
  "slug": "text",
  "icon": "https://example.com",
  "client_id": "text",
  "client_secret": "text",
  "authorization_url": "https://example.com",
  "token_url": "https://example.com",
  "userinfo_url": "https://example.com",
  "whitelist": [
    "https://example.com"
  ],
  "provider": "azure",
  "kwargs": {},
  "is_active": true
}

Delete a provider

delete

Delete an OAuth provider. Only superusers can perform this action.

Authorizations
Path parameters
slugstringRequired

The slug of the resource.

Example: obj_slug
Responses
204
No content
delete
DELETE /api/v1/oauth/{slug}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*

No content

List all providers

get

Retrieve a list of all OAuth providers. Non-superusers only see active providers.

Authorizations
Responses
200
A list of OAuth providers.
application/json
get
GET /api/v1/oauth/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
200

A list of OAuth providers.

[
  {
    "name": "text",
    "slug": "text",
    "icon": "https://example.com",
    "client_id": "text",
    "client_secret": "text",
    "authorization_url": "https://example.com",
    "token_url": "https://example.com",
    "userinfo_url": "https://example.com",
    "whitelist": [
      "https://example.com"
    ],
    "provider": "azure",
    "kwargs": {},
    "is_active": true
  }
]

Create a new provider

post

Create a new OAuth provider. Only superusers can perform this action.

Authorizations
Body
namestring · max: 256Optional

The name of the OAuth provider.

slugstring · max: 256Optional

A unique slug identifier for the provider.

iconstring · uriOptional

URL of the provider's icon.

client_idstring · max: 256Optional

Client ID for the OAuth provider.

client_secretstring · max: 512Optional

Client secret for the OAuth provider.

authorization_urlstring · uri · max: 512Optional

The URL for the authorization endpoint of the provider.

token_urlstring · uri · max: 512Optional

The URL for the token endpoint of the provider.

userinfo_urlstring · uri · max: 512Optional

The URL for the user information endpoint of the provider.

whiteliststring · uri[]Optional

A list of URLs whitelisted for the provider.

providerstring · enum · max: 32Optional

The type of provider. Possible values: azure, github, google, turkcell.

Possible values:
kwargsobjectOptional

Additional parameters for the provider.

is_activebooleanOptional

Indicates whether the provider is active.

Responses
201
Provider created successfully.
application/json
post
POST /api/v1/oauth/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 297

{
  "name": "text",
  "slug": "text",
  "icon": "https://example.com",
  "client_id": "text",
  "client_secret": "text",
  "authorization_url": "https://example.com",
  "token_url": "https://example.com",
  "userinfo_url": "https://example.com",
  "whitelist": [
    "https://example.com"
  ],
  "provider": "azure",
  "kwargs": {},
  "is_active": true
}
{
  "name": "text",
  "slug": "text",
  "icon": "https://example.com",
  "client_id": "text",
  "client_secret": "text",
  "authorization_url": "https://example.com",
  "token_url": "https://example.com",
  "userinfo_url": "https://example.com",
  "whitelist": [
    "https://example.com"
  ],
  "provider": "azure",
  "kwargs": {},
  "is_active": true
}

Was this helpful?