创建应用
POST
/api/v2/applications
请求参数
Header 参数
Authorization
string
必需
示例值:
Bearer token
x-authing-userpool-id
string
用户池 ID
示例值:
59f86b4832eb28071bdd9214
Body 参数application/json
templateCode
string
可选
templateData
object
可选
name
string
自建应用名称
identifier
string
自建应用标识符
logo
string
自建应用 Logo
oidcConfig
string
可选
redirectUris
array[string]
可选
protocol
string
协议
示例
{
"templateCode": "string",
"templateData": {},
"name": "string",
"identifier": "string",
"logo": "string",
"oidcConfig": "string",
"redirectUris": [
"string"
],
"protocol": "string"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://core.authing.cn/api/v2/applications' \
--header 'Authorization: Bearer token' \
--header 'x-authing-userpool-id: 59f86b4832eb28071bdd9214' \
--header 'Content-Type: application/json' \
--data-raw '{
"templateCode": "string",
"templateData": {},
"name": "string",
"identifier": "string",
"logo": "string",
"oidcConfig": "string",
"redirectUris": [
"string"
],
"protocol": "string"
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
qrcodeScanning
object
必需
id
string
必需
userPoolId
string
必需
protocol
string
必需
name
string
必需
secret
string
必需
identifier
string
必需
jwks
object
必需
redirectUris
array[string]
必需
css
string
必需
oidcConfig
object
必需
oauthConfig
object
必需
guardVersion
string
必需
createdAt
string
必需
updatedAt
string
必需
description
null
必需
ssoPageCustomizationSettings
null
必需
logo
string
必需
logoutRedirectUris
null
必需
initLoginUrl
null
必需
loginTabs
null
必需
passwordTabConfig
null
必需
defaultLoginTab
string
必需
registerTabs
null
必需
defaultRegisterTab
string
必需
extendsFields
null
必需
complateFiledsPlace
null
必需
ext
null
必需
oidcJWEConfig
null
必需
samlConfig
null
必需
casConfig
null
必需
asaConfig
null
必需
template
null
必需
skipMfa
boolean
必需
permissionStrategy
object
必需
isOfficial
boolean
必需
isDeleted
boolean
必需
isDefault
boolean
必需
isDemo
boolean
必需
oidcProviderEnabled
boolean
必需
oauthProviderEnabled
boolean
必需
samlProviderEnabled
boolean
必需
casProviderEnabled
boolean
必需
registerDisabled
boolean
必需
extendsFieldsEnabled
boolean
必需
skipComplateFileds
boolean
必需
showAuthorizationPage
boolean
必需
enableSubAccount
boolean
必需
enableDeviceMutualExclusion
boolean
必需
loginRequireEmailVerified
boolean
必需
agreementEnabled
boolean
必需
isIntegrate
boolean
必需
ssoEnabled
boolean
必需
casExpireBaseBrowser
boolean
必需
isAsa
boolean
必需
appType
string
必需
示例
{
"code": 200,
"message": "创建应用成功!",
"data": {
"qrcodeScanning": {
"redirect": false,
"interval": 1500
},
"id": "61debdec45371e8b8c4dd39e",
"userPoolId": "59f86b4832eb28071bdd9214",
"protocol": "oidc",
"name": "eirgoierge",
"secret": "4bbb822cde0f5774b05e890316c98a33",
"identifier": "snerger",
"jwks": {
"keys": [
{
"e": "AQAB",
"n": "02WNXziB9aO4zANyZkEaY9Q9_gBhQCs_V52rXgSKj3YM8lXkEozVB0NiF2s7lYGXY2MGKNykRfqO3VUyrrBKMmGMPp8PmEk6h2bkTJTf_RFowkTwOcuHYPIzD_OKjEZpxtLArFU9pOh4N5ZBpdCVjBYSGigrimlRqhyQncqOysFR5yQ4h6_Mb_AsJ1FQfm00uOoum3AgLZPaBHU9bp3H4DTaP2MVuqyyoZ9ZIWKoMGxs5AAfUyXy7RqrpPSSn3pzakO_l1LoQEAmGURtL0kCD1klCLAdF6cFBNIlXBpK8L4CCTdi8mFwGLbaC4ausrsIhOGFgbGlGblRdHnofjNztQ",
"d": "M4xm7dpMroaO8IjCo7aqZb-ComabUFd7abUT7agz1YnW3F0fcXqQE-ZVjBpk_C8OqHikLuCm2j2gCs7Uvg5U-XYaCccluV_Z-tyXPSlseTx-jCjdX2qHB5fn5bLgjRY6gvYvb5aVopnhfsSQG4wCe5eCMIitHWJTPKUciq2zJjOOTnhlGZtMvpDGQDSS0iXvg9jFquY2KVsE0rz2zWsusT4sZx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ig"
}
]
},
"redirectUris": [
"{{CONSOLE_DOMAIN}}/console/get-started/61debdec45371e8b8c4dd39e"
],
"css": "/* \n Edit login page css\n eg:\n .authing-guard-layout {\n background: black !important;\n }\n Change the background color\n*/",
"oidcConfig": {
"grant_types": [
"authorization_code",
"password",
"refresh_token"
],
"response_types": [
"code"
],
"id_token_signed_response_alg": "HS256",
"jwks_uri": null,
"token_endpoint_auth_method": "client_secret_post",
"request_object_encryption_enc": null,
"request_object_encryption_alg": null,
"request_object_signing_alg": null,
"userinfo_encrypted_response_enc": null,
"userinfo_encrypted_response_alg": null,
"userinfo_signed_response_alg": null,
"id_token_encrypted_response_enc": null,
"id_token_encrypted_response_alg": null,
"jwks": null,
"authorization_code_expire": 600,
"id_token_expire": 1209600,
"access_token_expire": 1209600,
"refresh_token_expire": 2592000,
"cas_expire": 1209600,
"skip_consent": true
},
"oauthConfig": {
"id": "61debdec45371e8b8c4dd39e",
"client_secret": "4bbb822cde0f5774b05e890316c98a33",
"redirect_uris": [],
"grants": [
"authorization_code"
],
"access_token_lifetime": 1209600,
"refresh_token_lifetime": 2592000,
"introspection_endpoint_auth_method": "client_secret_post",
"revocation_endpoint_auth_method": "client_secret_post"
},
"guardVersion": "v2",
"createdAt": "2022-01-12T11:39:24.744Z",
"updatedAt": "2022-01-12T11:39:24.811Z",
"description": null,
"ssoPageCustomizationSettings": null,
"logo": "default-app-logo.png",
"logoutRedirectUris": null,
"initLoginUrl": null,
"loginTabs": null,
"passwordTabConfig": null,
"defaultLoginTab": "password",
"registerTabs": null,
"defaultRegisterTab": "email",
"extendsFields": null,
"complateFiledsPlace": null,
"ext": null,
"oidcJWEConfig": null,
"samlConfig": null,
"casConfig": null,
"asaConfig": null,
"template": null,
"skipMfa": false,
"permissionStrategy": {
"allowPolicyId": null,
"denyPolicyId": null,
"enabled": false,
"defaultStrategy": "ALLOW_ALL"
},
"isOfficial": false,
"isDeleted": false,
"isDefault": false,
"isDemo": false,
"oidcProviderEnabled": true,
"oauthProviderEnabled": false,
"samlProviderEnabled": false,
"casProviderEnabled": false,
"registerDisabled": false,
"extendsFieldsEnabled": false,
"skipComplateFileds": false,
"showAuthorizationPage": false,
"enableSubAccount": false,
"enableDeviceMutualExclusion": false,
"loginRequireEmailVerified": false,
"agreementEnabled": false,
"isIntegrate": false,
"ssoEnabled": false,
"casExpireBaseBrowser": false,
"isAsa": false,
"appType": "INDIVIDUAL"
}
}
修改于 2022-01-13 02:47:56