获取指定身份源配置模板
GET
/api/v2/extIdpTmpl/{type}
请求参数
Path 参数
type
string
必需
示例值:
github
Header 参数
x-authing-userpool-id
string
用户池 ID
示例值:
61b95d6c96d42670da568408
Authorization
string
Token
示例值:
Bearer Token
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://core.authing.cn/api/v2/extIdpTmpl/github' \
--header 'x-authing-userpool-id: 61b95d6c96d42670da568408' \
--header 'Authorization: Bearer Token'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
type
string
必需
name
string
必需
name_en
string
必需
desc
string
必需
desc_en
string
必需
logo
string
必需
allowMultiple
boolean
必需
allowMultipleConn
boolean
必需
connectionTmpls
array [object {10}]
必需
示例
{
"code": 200,
"message": "获取模板详细信息成功",
"data": {
"type": "github",
"name": "GitHub",
"name_en": "GitHub",
"desc": "数以百万计的开发者和公司在全球最大、最先进的开发平台 GitHub 上构建、发布和维护他们的软件",
"desc_en": "Millions of developers and companies build, publish and maintain their software on GitHub, the world's largest and most advanced development platform",
"logo": "https://files.authing.co/authing-console/social-connections/icon_github.png",
"allowMultiple": false,
"allowMultipleConn": false,
"connectionTmpls": [
{
"type": "github",
"name": "GitHub",
"name_en": "GitHub",
"logo": "https://files.authing.co/authing-console/social-connections/icon_github.png",
"description": "数以百万计的开发者和公司在全球最大、最先进的开发平台 GitHub 上构建、发布和维护他们的软件",
"description_en": "Millions of developers and companies build, publish and maintain their software on GitHub, the world's largest and most advanced development platform",
"hidden": false,
"tooltip": {
"zh-CN": "GitHub 登录",
"en-US": "GitHub"
},
"fields": [
{
"key": "displayName",
"label": "显示名称",
"label_en": "Display Name",
"type": "input",
"required": true,
"placeholder": "Authing 登录表单将会显示一个“{Display Name} 登录”的按钮",
"placeholder_en": "The Authing login form will display a '{Display Name} Login' button"
},
{
"key": "clientID",
"label": "Client ID",
"type": "input",
"required": true,
"placeholder": "请输入 Client ID",
"placeholder_en": "Please enter the Client ID"
},
{
"key": "clientSecret",
"label": "Client Secret",
"type": "input",
"required": true,
"placeholder": "请输入 Client Secret",
"placeholder_en": "Please enter the Client Secret"
},
{
"key": "callbackURL",
"label": "Callback URL",
"type": "input",
"required": false,
"placeholder": "请输入你的业务回调链接",
"placeholder_en": "Please enter the Callback URL"
},
{
"key": "scopes",
"label": "Scopes",
"type": "checkbox",
"children": [
{
"label": "repo",
"key": "repo"
},
{
"label": "repo:status",
"key": "repo:status"
},
{
"label": "repo_deployment",
"key": "repo_deployment"
},
{
"label": "public_repo",
"key": "public_repo"
},
{
"label": "repo:invite",
"key": "repo:invite"
},
{
"label": "admin:repo_hook",
"key": "admin:repo_hook"
},
{
"label": "write:repo_hook",
"key": "write:repo_hook"
},
{
"label": "read:repo_hook",
"key": "read:repo_hook"
},
{
"label": "admin:org",
"key": "admin:org"
},
{
"label": "write:org",
"key": "write:org"
},
{
"label": "read:org",
"key": "read:org"
},
{
"label": "admin:public_key",
"key": "admin:public_key"
},
{
"label": "write:public_key",
"key": "write:public_key"
},
{
"label": "read:public_key",
"key": "read:public_key"
},
{
"label": "admin:org_hook",
"key": "admin:org_hook"
},
{
"label": "gist",
"key": "gist"
},
{
"label": "notifications",
"key": "notifications"
},
{
"label": "user",
"key": "user"
},
{
"label": "read:user",
"key": "read:user"
},
{
"label": "user:email",
"key": "user:email"
},
{
"label": "user:follow",
"key": "user:follow"
},
{
"label": "delete_repo",
"key": "delete_repo"
},
{
"label": "write:discussion",
"key": "write:discussion"
},
{
"label": "read:discussion",
"key": "read:discussion"
},
{
"label": "write:packages",
"key": "write:packages"
},
{
"label": "read:packages",
"key": "read:packages"
},
{
"label": "delete:packages",
"key": "delete:packages"
},
{
"label": "admin:gpg_key",
"key": "admin:gpg_key"
},
{
"label": "write:gpg_key",
"key": "write:gpg_key"
},
{
"label": "read:gpg_key",
"key": "read:gpg_key"
},
{
"label": "workflow",
"key": "workflow"
}
]
},
{
"key": "redirectUrl",
"label": "回调地址",
"label_en": "Redirect Url",
"type": "custom",
"extra": "你需要将此链接配置到对应身份源的回调地址中",
"extra_en": "You need to configure this link to the callback address of the corresponding identity source",
"valueType": "redirectUrl"
}
],
"availableUserMatchFields": [
{
"name": "邮箱",
"key": "email"
}
]
}
]
}
}
修改于 2022-01-13 11:31:42