メインコンテンツへスキップ
POST
https://{tenantDomain}/api/v2
/
connections
Go
package example

import (
    context "context"

    management "github.com/auth0/go-auth0/management/management"
    client "github.com/auth0/go-auth0/management/management/client"
    option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    request := &management.CreateConnectionRequestContent{
        Name: "name",
        Strategy: management.ConnectionIdentityProviderEnumAd,
    }
    client.Connections.Create(
        context.TODO(),
        request,
    )
}
{
  "authentication": {
    "active": true
  },
  "connected_accounts": {
    "active": true,
    "cross_app_access": true
  },
  "display_name": "<string>",
  "enabled_clients": [
    "<string>"
  ],
  "id": "con_0000000000000001",
  "is_domain_connection": true,
  "metadata": {},
  "name": "My connection",
  "options": {},
  "realms": [
    "<string>"
  ],
  "show_as_button": true,
  "strategy": "auth0"
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

ボディ

name
string
必須

接続の名前です。先頭と末尾は英数字である必要があり、使用できる文字は英数字と - のみです。最大長は 128 です。

Maximum string length: 128
Pattern: ^[a-zA-Z0-9](-[a-zA-Z0-9]|[a-zA-Z0-9])*$
strategy
enum<string>
必須

接続の IDプロバイダー識別子

利用可能なオプション:
ad,
adfs,
amazon,
apple,
dropbox,
bitbucket,
auth0-oidc,
auth0,
baidu,
bitly,
box,
custom,
daccount,
dwolla,
email,
evernote-sandbox,
evernote,
exact,
facebook,
fitbit,
github,
google-apps,
google-oauth2,
instagram,
ip,
line,
linkedin,
oauth1,
oauth2,
office365,
oidc,
okta,
paypal,
paypal-sandbox,
pingfederate,
planningcenter,
salesforce-community,
salesforce-sandbox,
salesforce,
samlp,
sharepoint,
shopify,
shop,
sms,
soundcloud,
thirtysevensignals,
twitter,
untappd,
vkontakte,
waad,
weibo,
windowslive,
wordpress,
yahoo,
yandex
authentication
object
GA

ログイン時の認証で使用する接続の用途を設定します。

connected_accounts
object
GA

接続済みアカウントおよび Token Vault で使用する接続の用途を設定します。

display_name
string

新しい Universal Login エクスペリエンスで使用される接続名

Maximum string length: 128
enabled_clients
string<client-id>[]

このプロパティの使用は推奨されません。クライアントのセットに対して接続を有効にするには、PATCH /v2/connections/{id}/clients エンドポイントを使用してください。

接続を有効にする対象のクライアントの id です。

is_domain_connection
boolean

true の場合、サードパーティアプリケーションで使用できるようにドメインレベルの接続に昇格します。false の場合、接続は昇格されないため、接続が有効になっているファーストパーティアプリケーションのみが使用できます。(デフォルトは false です。)

metadata
object

文字列値(最大 255 文字)を持つオブジェクト形式の、接続に関連付けられたメタデータ。メタデータのプロパティは最大 10 個まで指定できます。

options
object

接続のオプション(接続戦略によって異なります)

realms
string<connection-realm>[]

この接続が使用されるレルム(例: メールドメイン)を定義します。配列が空、またはプロパティが指定されていない場合は、接続名がレルムとして追加されます。

この接続が属するレルム

show_as_button
boolean

ログインページにこの接続のボタンを表示できるようにします(新しいエクスペリエンスのみ)。false の場合、HRD でのみ使用できます。(デフォルトは false です。)

レスポンス

接続を作成しました。

authentication
object
GA

ログイン時の認証で使用する接続の用途を設定します。

connected_accounts
object
GA

接続済みアカウントおよび Token Vault で使用する接続の用途を設定します。

display_name
string

ログイン画面で使用される接続名

enabled_clients
string[]
deprecated

非推奨のプロパティです。接続が有効になっているクライアントの id を取得するには、GET /connections/:id/clients エンドポイントを使用してください

クライアントID

id
string
デフォルト:con_0000000000000001

接続の識別子

is_domain_connection
boolean

接続がドメインレベルの場合は true

metadata
object

文字列値(最大 255 文字)を持つオブジェクト形式の、接続に関連付けられたメタデータ。メタデータのプロパティは最大 10 個まで指定できます。

name
string
デフォルト:My connection

接続名

options
object

レスポンスで options を返すには、read:connections_options スコープが含まれている必要があります

realms
string<connection-realm>[]

この接続が使用されるレルム(例: メールドメイン)を定義します。配列が空、またはこのプロパティが指定されていない場合は、接続名がレルムとして追加されます。

この接続が属するレルム

show_as_button
boolean

ログインページにこの接続のボタンを表示する機能を有効にします(新しいエクスペリエンスのみ)。false の場合は、HRD でのみ使用できます。

strategy
string
デフォルト:auth0

IDプロバイダーに関連する接続のタイプ