
![[8.5.5.4 或更高版本]](../ng_v8554.gif)
配置 OpenID Connect 提供者以接受发现请求
发现配置端点提供有关 OpenID Connect 提供者 (OP) 服务器支持的功能的信息。
关于此任务
此服务返回的元数据基于 OIDC Discovery 1.0 规范提供者元数据并对其进行扩展。如果未指定任何设置,那么此服务返回一组缺省配置。否则,请参阅属性列表以了解其用途及可能的可配置选项。
过程
可在发现配置服务中覆盖所选属性的缺省值。此操作是通过在 server.xml 文件中指定值来执行的。请参阅以下属性表以查看可配置属性及可能的配置选项。
属性名称 | 数据类型 | 必需/可选 | 描述 |
---|---|---|---|
responseTypesSupported | 输入 | 可选 | OpenID Connect 提供者 (OP) 服务器支持的响应类型。除非指定,否则缺省值为 code、token 和 id_token
token。可指定多个值。这些值为字符串。例如,可能的值为:
|
subjectTypesSupported | 仅输出 | 不适用 | OP 服务器支持的主体集类型。此值设置为 public。此值为字符串。 |
idTokenSigningAlgValuesSupported | 仅输出 | 可选 | OP 服务器支持的标识令牌签名算法。在 openidConnectProvider 服务器配置中,此值被指定为服务器属性 signatureAlgorithm。除非指定,否则缺省值为 HS256。只能指定一个值。它是一个字符串。例如,在
openidConnectProvider 配置中,属性 signatureAlgorithm 的可能值为:
|
scopesSupported | 输入 | 可选 | OP 服务器支持的范围值。除非指定,否则缺省值为 openid、general、profile、email、address
和 phone。可指定多个值。这些值为字符串。例如,可能的值为:
|
claimsSupported | 输入 | 可选 | OP 服务器支持的声明值。除非指定,否则缺省值为 sub、groupIds、name、preferred_username、picture、locale、email 和
profile。可指定多个值。这些值为字符串。例如,可能的值为:
|
responseModesSupported | 输入 | 可选 | OP 服务器支持的响应方式。除非指定,否则缺省值为 query 和 fragment。可指定多个值。这些值为字符串。
|
grantTypesSupported | 输入 | 可选 | OP 服务器支持的授权类型。除非指定,否则缺省值为
authorization_code、implicit、refresh_token、client_credentials、password 和 urn:ietf:params:oauth:grant-type:jwtbearer。可指定多个值。这些值为字符串。例如,可能的值为:
|
tokenEndpointAuthMethodsSupported | 输入 | 可选 | OP 服务器支持的令牌端点授权方法。除非指定,否则缺省值为 client_secret_post 和 client_secret_basic。可指定多个值。这些值为字符串。例如,可能的值为:
|
displayValuesSupported | 仅输出 | 不适用 | OP 服务器支持的显示值。此值设置为 page。此值为字符串。 |
claimTypesSupported | 仅输出 | 不适用 | OP 服务器支持的声明类型值。此值设置为 normal。此值为字符串。 |
claimsParameterSupported | 输入 | 可选 | 指示 OP 服务器是否支持声明参数。除非指定,否则缺省值为 false。只能指定一个值。它是一个布尔值。例如,可能的值为:
|
requestParameterSupported | 输入 | 可选 | 指示 OP 服务器是否支持请求参数。除非指定,否则缺省值为 false。只能指定一个值。它是一个布尔值。例如,可能的值为:
|
requestUriParameterSupported | 输入 | 可选 | 指示 OP 服务器是否支持请求 URI 参数。除非指定,否则缺省值为 false。只能指定一个值。它是一个布尔值。例如,可能的值为:
|
requireRequestUriRegistration | 输入 | 可选 | 指示 OP 服务器是否支持需要请求 URI 注册。除非指定,否则缺省值为 false。只能指定一个值。它是一个布尔值。例如,可能的值为:
|
发现配置的示例
以下示例假定在端口 443 上对 Liberty OP 配置了 SSL。
https://server.example.com:443/oidc/endpoint/<provider_name>/
可从以下位置访问发现配置端点:
https://server.example.com:443/oidc/endpoint/<provider_name>/.well-known/openid-configuration
例如,在 server.xml 文件中,用户可按以下方式定制其 OpenID Connect 发现配置属性:
<openidConnectProvider id="OidcConfigSample" oauthProviderRef="OAuthConfigSample">
<discovery
responseTypesSupported="token, id_token token"
subjectTypesSupported="public"
scopesSupported="openid, general, profile"
claimsSupported="sub, groupIds, name"
responseModesSupported="query"
grantTypesSupported="implicit"
tokenEndpointAuthMethodsSupported="client_secret_basic"
displayValuesSupported="page"
claimTypesSupported="normal"
claimsParameterSupported="true"
requestParameterSupported="true"
requestUriParameterSupported="true"
requireRequestUriRegistration="true"
/>
</openidConnectProvider>
<oauthProvider id="OAuthConfigSample">
</oauthProvider>
Request Headers: GET https://server.example.com:443/oidc/endpoint/<provider_name>/.well-known/openid-configuration Response Headers: Status: 200 Content-Type: application/json Cache-Control:public, max-age=3600 Response Body: { "introspection_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/introspect", "coverage_map_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/coverage_map", "issuer":"https://server.example.com:443/oidc/endpoint/<provider_name>", "authorization_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/authorize", "token_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/token", "response_types_supported":[ "token", "id_token token" ], "subject_types_supported":[ "public" ], "userinfo_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/userinfo", "registration_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/registration", "scopes_supported":[ "openid", "general", "profile" ], "claims_supported":[ "sub", "groupIds", "name" ], "response_modes_supported":[ "query" ], "grant_types_supported":[ "implicit" ], "token_endpoint_auth_methods_supported":[ "client_secret_basic" ], "display_values_supported":[ "page" ], "claim_types_supported":[ "normal" ], "claims_parameter_supported":true, "request_parameter_supported":true, "request_uri_parameter_supported":true, "require_request_uri_registration":true, "check_session_iframe":"https://server.example.com:443/oidc/endpoint/<provider_name>/check_session_iframe", "end_session_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/end_session" }
Request Headers: GET https://server.example.com:443/oidc/endpoint/<provider_name>/.well-known/openid-configuration Response Headers: Status: 200 Content-Type: application/json Cache-Control:public, max-age=3600 Response Body: { "introspection_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/introspect", "coverage_map_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/coverage_map", "issuer":"https://server.example.com:443/oidc/endpoint/<provider_name>", "authorization_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/authorize", "token_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/token", "response_types_supported":[ "code", "token", "id_token token" ], "subject_types_supported":[ "public" ], "userinfo_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/userinfo", "registration_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/registration", "scopes_supported":[ "openid", "general", "profile", "email", "address", "phone" ], "claims_supported":[ "sub", "groupIds", "name", "preferred_username", "picture", "locale", "email", "profile" ], "response_modes_supported":[ "query", "fragment" ], "grant_types_supported":[ "authorization_code", "implicit", "refresh_token", "client_credentials", "password", "urn:ietf:params:oauth:grant-type:jwt-bearer" ], "token_endpoint_auth_methods_supported":[ "client_secret_post", "client_secret_basic" ], "display_values_supported":[ "page" ], "claim_types_supported":[ "normal" ], "claims_parameter_supported":false, "request_parameter_supported":false, "request_uri_parameter_supported":false, "require_request_uri_registration":false, "check_session_iframe":"https://server.example.com:443/oidc/endpoint/<provider_name>/check_session_iframe", "end_session_endpoint":"https://server.example.com:443/oidc/endpoint/<provider_name>/end_session" }