- 快速开始
- 身份源(Connection)
- 应用(Client)
- 资源服务器(ResourceServer)
- 用户(User)
- 角色(Role)
- 分组(Group)
- 租户(Tenant)
- 组织(Organization)
- 动作(Action)
- 授权(Grant)
- 应用授权(ClientGrant)
- 日志(Log)
- 自定义域名(CusomDomain)
- 密钥(Key)
- 任务(Job)
- 多因素认证(MFA)
- 安全防护(AttackProtection)
- 品牌化(Branding)
创建应用
POST
/api/v1/clients
应用
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
display_name
string
应用的可读名称
response_types
array[string]
响应类型
枚举值:
codeid_token tokentoken
tenant
string
应用所属的租户ID
name
string
应用名
description
string
描述
logo_uri
string
必需
redirect_uris
array[string]
重定向链接
allowed_origins
array[string]
必需
web_origins
array[string]
必需
client_aliases
array[string]
应用别名
allowed_clients
array[string]
必需
allowed_logout_urls
array[string]
允许的退登地址
token_endpoint_auth_method
enum<string>
端点授权方式
枚举值:
client_secret_basicclient_secret_jwtclient_secret_postprivate_key_jwtnone
grant_types
array[string]
授权类型
枚举值:
authorization_codeimplicitrefresh_tokenclient_credentialspasswordhttp://authok.cn/oauth/grant-type/password-realmhttp://authok.cn/oauth/grant-type/mfa-oobhttp://authok.cn/oauth/grant-type/mfa-otphttp://authok.cn/oauth/grant-type/passwordless/otphttp://authok.cn/oauth/grant-type/mfa-recovery-codeurn:ietf:params:oauth:grant-type:device_code
app_type
enum<string>
应用类型
枚举值:
non_interactivenativewebspa
is_first_party
boolean
是否第一方应用
oidc_conformant
boolean
必需
jwt_configuration
object
必需
lifetime_in_seconds
integer
必需
scopes
object
必需
alg
string
必需
encryption_key
object
必需
pub
string
必需
cert
string
必需
subject
string
必需
sso
boolean
必需
cross_origin_auth
boolean
必需
cross_origin_loc
string
必需
sso_disabled
boolean
必需
custom_login_page_on
boolean
必需
custom_login_page
string
必需
custom_login_page_preview
string
必需
form_template
string
必需
addons
object
必需
aws
object
必需
azure_blob
object
必需
azure_sb
object
必需
rms
object
必需
mscrm
object
必需
slack
object
必需
sentry
object
必需
box
object
必需
cloudbees
object
必需
concur
object
必需
dropbox
object
必需
echosign
object
必需
egnyte
object
必需
firebase
object
必需
newrelic
object
必需
office365
object
必需
salesforce
object
必需
salesforce_api
object
必需
salesforce_sandbox_api
object
必需
samlp
object
必需
layer
object
必需
sap_api
object
必需
sharepoint
object
必需
springcm
object
必需
wams
object
必需
wsfed
object
必需
zendesk
object
必需
zoom
object
必需
sso_integration
string
必需
client_metadata
object
必需
mobile
object
必需
android
object
必需
ios
object
必需
initiate_login_uri
string
初始登录链接
native_social_login
object
必需
apple
string
必需
facebook
string
必需
refresh_token
object
必需
rotation_type
string
必需
expiration_type
string
必需
leeway
integer
必需
token_lifetime
integer
必需
infinite_token_lifetime
boolean
必需
idle_token_lifetime
integer
必需
infinite_idle_token_lifetime
boolean
必需
organization_usage
string
必需
organization_require_behavior
string
必需
示例
{
"display_name": "电商后端应用",
"response_types": [
"id_token token",
"token",
"code"
],
"tenant": "j32ojfeoi",
"name": "ec-spa",
"logo_uri": "https://mydomain/logo.svg",
"redirect_uris": [
"https://mydomain/callback"
],
"allowed_origins": [
"https://mydomain"
],
"allowed_logout_urls": [
"https://mydomain/logout"
],
"token_endpoint_auth_method": "client_secret_jwt",
"grant_types": [
"password"
],
"app_type": "web",
"is_first_party": false,
"oidc_conformant": false,
"jwt_configuration": {
"lifetime_in_seconds": 1053821319637,
"scopes": {},
"alg": "RS256"
},
"sso": true,
"sso_disabled": true,
"custom_login_page_on": false,
"initiate_login_uri": "https://mydomain/login"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://..authok.cn/api/v1/clients' \
--header 'Content-Type: application/json' \
--data-raw '{
"display_name": "电商后端应用",
"response_types": [
"id_token token",
"token",
"code"
],
"tenant": "j32ojfeoi",
"name": "ec-spa",
"logo_uri": "https://mydomain/logo.svg",
"redirect_uris": [
"https://mydomain/callback"
],
"allowed_origins": [
"https://mydomain"
],
"allowed_logout_urls": [
"https://mydomain/logout"
],
"token_endpoint_auth_method": "client_secret_jwt",
"grant_types": [
"password"
],
"app_type": "web",
"is_first_party": false,
"oidc_conformant": false,
"jwt_configuration": {
"lifetime_in_seconds": 1053821319637,
"scopes": {},
"alg": "RS256"
},
"sso": true,
"sso_disabled": true,
"custom_login_page_on": false,
"initiate_login_uri": "https://mydomain/login"
}'
返回响应
🟢200成功
application/json
Body
display_name
string
可读名称
response_types
array[string]
响应类型
枚举值:
codeid_token tokentoken
tenant
string
租户ID
name
string
应用名
description
string
描述
logo_uri
string
logo链接
redirect_uris
array[string]
重定向链接
allowed_origins
array[string]
允许的访问来源
web_origins
array[string]
必需
client_aliases
array[string]
应用别名
allowed_clients
array[string]
必需
allowed_logout_urls
array[string]
允许的退登地址
token_endpoint_auth_method
enum<string>
端点授权方式
枚举值:
client_secret_basicclient_secret_jwtclient_secret_postprivate_key_jwtnone
grant_types
array[string]
授权类型
枚举值:
authorization_codeimplicitrefresh_tokenclient_credentialspasswordhttp://authok.cn/oauth/grant-type/password-realmhttp://authok.cn/oauth/grant-type/mfa-oobhttp://authok.cn/oauth/grant-type/mfa-otphttp://authok.cn/oauth/grant-type/passwordless/otphttp://authok.cn/oauth/grant-type/mfa-recovery-codeurn:ietf:params:oauth:grant-type:device_code
app_type
enum<string>
应用类型
枚举值:
non_interactivenativewebspa
is_first_party
boolean
是否第一方应用
oidc_conformant
boolean
必需
jwt_configuration
object
必需
lifetime_in_seconds
integer
必需
scopes
object
必需
alg
string
必需
encryption_key
object
必需
pub
string
必需
cert
string
必需
subject
string
必需
sso
boolean
必需
cross_origin_auth
boolean
必需
cross_origin_loc
string
必需
sso_disabled
boolean
必需
custom_login_page_on
boolean
必需
custom_login_page
string
必需
custom_login_page_preview
string
必需
form_template
string
必需
addons
object
必需
aws
object
必需
azure_blob
object
必需
azure_sb
object
必需
rms
object
必需
mscrm
object
必需
slack
object
必需
sentry
object
必需
box
object
必需
cloudbees
object
必需
concur
object
必需
dropbox
object
必需
echosign
object
必需
egnyte
object
必需
firebase
object
必需
newrelic
object
必需
office365
object
必需
salesforce
object
必需
salesforce_api
object
必需
salesforce_sandbox_api
object
必需
samlp
object
必需
layer
object
必需
sap_api
object
必需
sharepoint
object
必需
springcm
object
必需
wams
object
必需
wsfed
object
必需
zendesk
object
必需
zoom
object
必需
sso_integration
string
必需
client_metadata
object
必需
mobile
object
必需
android
object
必需
ios
object
必需
initiate_login_uri
string
初始登录链接
native_social_login
object
必需
apple
string
必需
facebook
string
必需
refresh_token
object
必需
rotation_type
string
必需
expiration_type
string
必需
leeway
integer
必需
token_lifetime
integer
必需
infinite_token_lifetime
boolean
必需
idle_token_lifetime
integer
必需
infinite_idle_token_lifetime
boolean
必需
organization_usage
string
必需
organization_require_behavior
string
必需
client_id
string
应用ID
client_secret
string
应用密钥
示例
{
"display_name": "电商后端应用",
"response_types": [
"token",
"id_token token"
],
"tenant": "r3iofjisjo",
"name": "ec-web",
"logo_uri": "https://mydomain/logo.svg",
"redirect_uris": [
"https://mydomain/callback"
],
"allowed_origins": [
"https://mydomain"
],
"allowed_logout_urls": [
"https://mydomain/logout"
],
"token_endpoint_auth_method": "client_secret_post",
"grant_types": [
"http://authok.cn/oauth/grant-type/mfa-oob"
],
"app_type": "spa",
"is_first_party": true,
"oidc_conformant": false,
"jwt_configuration": {
"lifetime_in_seconds": 201148777010,
"scopes": {},
"alg": "RS256"
},
"sso": true,
"cross_origin_auth": false,
"cross_origin_loc": "consequat",
"sso_disabled": false,
"custom_login_page_on": true,
"form_template": "sunt",
"client_metadata": {},
"initiate_login_uri": "https://mydomain/login",
"client_id": "b2ioefEoeoifijwowifiofof",
"client_secret": "jfi32jofjsoifjoeiioosof"
}