はじめに
Auth0はOpenID Connect Discovery 1.0という仕様に定義されている構成情報(openid-configuration
)を公開しています。
今回はこの構成情報の内容を見てみました。
openid-configurationの場所
OpenID Connect Discovery 1.0の「4.1. OpenID Provider Configuration Request」に記載されているパスでAuth0もopenid-configuration
を公開しています。
/.well-known/openid-configuration
以下のようなパスにアクセスすると、Auth0のテナント毎に置かれているopenid-configuration
を参照することができます。
https://{Auth0テナントのドメイン}/.well-known/openid-configuration
openid-configurationの内容
実際にアクセスすると以下のようなjsonが取得できます。
{
"issuer": "https://{Auth0テナントのドメイン}/",
"authorization_endpoint": "https://{Auth0テナントのドメイン}/authorize",
"token_endpoint": "https://{Auth0テナントのドメイン}/oauth/token",
"device_authorization_endpoint": "https://{Auth0テナントのドメイン}/oauth/device/code",
"userinfo_endpoint": "https://{Auth0テナントのドメイン}/userinfo",
"mfa_challenge_endpoint": "https://{Auth0テナントのドメイン}/mfa/challenge",
"jwks_uri": "https://{Auth0テナントのドメイン}/.well-known/jwks.json",
"registration_endpoint": "https://{Auth0テナントのドメイン}/oidc/register",
"revocation_endpoint": "https://{Auth0テナントのドメイン}/oauth/revoke",
"scopes_supported": [
"openid",
"profile",
"offline_access",
"name",
"given_name",
"family_name",
"nickname",
"email",
"email_verified",
"picture",
"created_at",
"identities",
"phone",
"address"
],
"response_types_supported": [
"code",
"token",
"id_token",
"code token",
"code id_token",
"token id_token",
"code token id_token"
],
"code_challenge_methods_supported": ["S256", "plain"],
"response_modes_supported": ["query", "fragment", "form_post"],
"subject_types_supported": ["public"],
"id_token_signing_alg_values_supported": ["HS256", "RS256"],
"token_endpoint_auth_methods_supported": [
"client_secret_basic",
"client_secret_post"
],
"claims_supported": [
"aud",
"auth_time",
"created_at",
"email",
"email_verified",
"exp",
"family_name",
"given_name",
"iat",
"identities",
"iss",
"name",
"nickname",
"phone_number",
"picture",
"sub"
],
"request_uri_parameter_supported": false
}
これを見ると、認可エンドポイントなどの各種エンドポイントのURLの他、Auth0が大まかにどういった仕様をサポートしているかがわかります。
主だったところだと、scopes_supported
にはAuth0が標準でサポートする認可リクエストのscope
パラメーターの値が列挙されていたり、claims_supported
にAuth0が提供し得る登録ユーザーの属性の一覧が列挙されていたりします。
各項目がなにを表しているかは、OpenID Connect Discovery 1.0の「3. OpenID Provider Metadata」に記載されている内容に準拠していると思いますので、詳細はそちらを参照するのがいいと思います。
おわりに
Auth0固有の仕様は公式ドキュメントを見るしかないと思いますが、OpenID Connectなどの標準仕様をどこまでサポートしているかサッと確認するときなんかはopenid-configuratio
を見ると手っ取り早いかと思います。
また、OpenID Connectで連携をする他システムが対応している場合は、このopenid-configuration
のURLを読み込ませるだけで基本的な設定が完了することもあります。
活用できるとこでは積極的に活用していってみてください。