SAML IDプロバイダーの構成設定
共通設定
これらはSAML IDプロバイダー(IdP)を構成するために使用される設定です。
ポストバックURL
IdP起点SSOを使用する場合は、必ずポストバックURLに接続パラメーターを含めてください。
https://{yourDomain}/login/callback?connection={yourConnectionName}
Was this helpful?
Organizations機能を使用している場合は、必要に応じて、目的の組織の組織IDを含む、次の組織パラメーターを含めることもできます。
https://{yourDomain}/login/callback?connection={yourConnectionName}&organization={yourCustomersOrganizationId}
Was this helpful?
エンティティID
サービスプロバイダーのID:
urn:auth0:{yourTenant}:{yourConnectionName}
Was this helpful?
connection.options.entityId
プロパティを使ってカスタムエンティティIDを作成できます。.詳細については、「カスタムエンティティIDを指定する」をお読みください。
カスタムエンティティIDは接続取得エンドポイントを用いて取得することができます。
curl --request GET \
--url 'https://{yourDomain}/api/v2/connections/%7ByourConnectionID%7D' \
--header 'authorization: Bearer {yourAccessToken}'
Was this helpful?
var client = new RestClient("https://{yourDomain}/api/v2/connections/%7ByourConnectionID%7D");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Bearer {yourAccessToken}");
IRestResponse response = client.Execute(request);
Was this helpful?
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://{yourDomain}/api/v2/connections/%7ByourConnectionID%7D"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "Bearer {yourAccessToken}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Was this helpful?
HttpResponse<String> response = Unirest.get("https://{yourDomain}/api/v2/connections/%7ByourConnectionID%7D")
.header("authorization", "Bearer {yourAccessToken}")
.asString();
Was this helpful?
var axios = require("axios").default;
var options = {
method: 'GET',
url: 'https://{yourDomain}/api/v2/connections/%7ByourConnectionID%7D',
headers: {authorization: 'Bearer {yourAccessToken}'}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
Was this helpful?
#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"authorization": @"Bearer {yourAccessToken}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{yourDomain}/api/v2/connections/%7ByourConnectionID%7D"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
Was this helpful?
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{yourDomain}/api/v2/connections/%7ByourConnectionID%7D",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {yourAccessToken}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Was this helpful?
import http.client
conn = http.client.HTTPSConnection("")
headers = { 'authorization': "Bearer {yourAccessToken}" }
conn.request("GET", "/{yourDomain}/api/v2/connections/%7ByourConnectionID%7D", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Was this helpful?
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://{yourDomain}/api/v2/connections/%7ByourConnectionID%7D")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {yourAccessToken}'
response = http.request(request)
puts response.read_body
Was this helpful?
import Foundation
let headers = ["authorization": "Bearer {yourAccessToken}"]
let request = NSMutableURLRequest(url: NSURL(string: "https://{yourDomain}/api/v2/connections/%7ByourConnectionID%7D")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
Was this helpful?
ACCESS_TOKEN
ヘッダー値をManagement APIv2アクセストークンと置き換えます。
SAML要求のバインディング
Protocol Bindingプロトコルバインディングとも呼ばれ、Auth0からIdPに送信されます。可能であれば、connection.options.protocolBinding
に基づいた値を動的に設定します。
connection.options.protocolBinding の値 |
SAML要求のバインディング値 |
---|---|
空の値("")または存在しない | HTTP-Redirect |
urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect |
HTTP-Redirect |
urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST |
HTTP-POST |
動的な値の設定が不可能であれば、HTTP-Redirect
デフォルト値)またはHTTP-Post
を選択します(プロトコルバインディングでこのオプションを選択した場合)。
SAML応答のバインディング
HTTP-Post
として設定されたSAMLトークンを、Auth0がIdPからどのように受け取るか。
NameID Format
指定なし
SAMLアサーションとSAML応答
SAMLアサーションとSAML応答は、個別または同時に署名することができます。
SingleLogoutサービスのURL
これは、SAML IDプロバイダーがログアウトの要求と応答を送信する場所です。
https://{yourDomain}/logout
Was this helpful?
SAMLログアウト要求は、IDプロバイダーが署名しなければなりません。
署名されたアサーション
次のリンクを使用して、異なる形式で公開鍵を取得してください。
IdPが要求する形式の証明書をダウンロードしてください。
IdP起点のシングルサインオン
IdP起点のシングルサインオンについての詳細は、「IdP起点のシングルサインオンを構成する」をお読みください。
メタデータ
SAML IDプロバイダーによっては、すべての必要な情報を含めたメタデータを直接インポートできるものもあります。Auth0では、接続のメタデータは以下からアクセスできます。
https://{yourDomain}/samlp/metadata?connection={yourConnectionName}
Was this helpful?
Organizations
フェデレーションIdPにある組織のACS URLを使用して、組織ログインフローを開始します。
https://{yourDomain}/samlp?connection={yourConnectionName}&organization=${yourOrgID}
Was this helpful?