Class DiscoveryDocument.Builder
java.lang.Object
cloud.opencode.base.oauth2.discovery.DiscoveryDocument.Builder
- Enclosing class:
DiscoveryDocument
DiscoveryDocument Builder
DiscoveryDocument 构建器
Builder for constructing immutable DiscoveryDocument instances.
用于构建不可变 DiscoveryDocument 实例的构建器。
- Since:
- JDK 25, opencode-base-oauth2 V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionauthorizationEndpoint(String authorizationEndpoint) Set the authorization endpoint.build()Build the DiscoveryDocument.codeChallengeMethodsSupported(List<String> codeChallengeMethodsSupported) Set the supported code challenge methods.deviceAuthorizationEndpoint(String deviceAuthorizationEndpoint) Set the device authorization endpoint.grantTypesSupported(List<String> grantTypesSupported) Set the supported grant types.introspectionEndpoint(String introspectionEndpoint) Set the introspection endpoint.Set the issuer identifier.Set the JWKS URI.parEndpoint(String parEndpoint) Set the pushed authorization request endpoint.registrationEndpoint(String registrationEndpoint) Set the registration endpoint.responseTypesSupported(List<String> responseTypesSupported) Set the supported response types.revocationEndpoint(String revocationEndpoint) Set the revocation endpoint.scopesSupported(List<String> scopesSupported) Set the supported scopes.tokenEndpoint(String tokenEndpoint) Set the token endpoint.tokenEndpointAuthMethodsSupported(List<String> tokenEndpointAuthMethodsSupported) Set the supported token endpoint authentication methods.userinfoEndpoint(String userinfoEndpoint) Set the userinfo endpoint.
-
Method Details
-
issuer
Set the issuer identifier. 设置颁发者标识符。- Parameters:
issuer- the issuer URL | 颁发者 URL- Returns:
- this builder | 此构建器
-
authorizationEndpoint
Set the authorization endpoint. 设置授权端点。- Parameters:
authorizationEndpoint- the authorization endpoint URL | 授权端点 URL- Returns:
- this builder | 此构建器
-
tokenEndpoint
Set the token endpoint. 设置令牌端点。- Parameters:
tokenEndpoint- the token endpoint URL | 令牌端点 URL- Returns:
- this builder | 此构建器
-
userinfoEndpoint
Set the userinfo endpoint. 设置用户信息端点。- Parameters:
userinfoEndpoint- the userinfo endpoint URL | 用户信息端点 URL- Returns:
- this builder | 此构建器
-
jwksUri
Set the JWKS URI. 设置 JWKS URI。- Parameters:
jwksUri- the JWKS URI | JWKS URI- Returns:
- this builder | 此构建器
-
registrationEndpoint
Set the registration endpoint. 设置注册端点。- Parameters:
registrationEndpoint- the registration endpoint URL | 注册端点 URL- Returns:
- this builder | 此构建器
-
revocationEndpoint
Set the revocation endpoint. 设置撤销端点。- Parameters:
revocationEndpoint- the revocation endpoint URL | 撤销端点 URL- Returns:
- this builder | 此构建器
-
introspectionEndpoint
Set the introspection endpoint. 设置内省端点。- Parameters:
introspectionEndpoint- the introspection endpoint URL | 内省端点 URL- Returns:
- this builder | 此构建器
-
deviceAuthorizationEndpoint
Set the device authorization endpoint. 设置设备授权端点。- Parameters:
deviceAuthorizationEndpoint- the device authorization endpoint URL | 设备授权端点 URL- Returns:
- this builder | 此构建器
-
parEndpoint
Set the pushed authorization request endpoint. 设置推送授权请求端点。- Parameters:
parEndpoint- the PAR endpoint URL | PAR 端点 URL- Returns:
- this builder | 此构建器
-
scopesSupported
Set the supported scopes. 设置支持的权限范围。- Parameters:
scopesSupported- the list of supported scopes | 支持的权限范围列表- Returns:
- this builder | 此构建器
-
responseTypesSupported
Set the supported response types. 设置支持的响应类型。- Parameters:
responseTypesSupported- the list of supported response types | 支持的响应类型列表- Returns:
- this builder | 此构建器
-
grantTypesSupported
Set the supported grant types. 设置支持的授权类型。- Parameters:
grantTypesSupported- the list of supported grant types | 支持的授权类型列表- Returns:
- this builder | 此构建器
-
tokenEndpointAuthMethodsSupported
public DiscoveryDocument.Builder tokenEndpointAuthMethodsSupported(List<String> tokenEndpointAuthMethodsSupported) Set the supported token endpoint authentication methods. 设置支持的令牌端点认证方法。- Parameters:
tokenEndpointAuthMethodsSupported- the list of supported auth methods | 支持的认证方法列表- Returns:
- this builder | 此构建器
-
codeChallengeMethodsSupported
public DiscoveryDocument.Builder codeChallengeMethodsSupported(List<String> codeChallengeMethodsSupported) Set the supported code challenge methods. 设置支持的代码挑战方法。- Parameters:
codeChallengeMethodsSupported- the list of supported code challenge methods | 支持的代码挑战方法列表- Returns:
- this builder | 此构建器
-
build
Build the DiscoveryDocument. 构建 DiscoveryDocument。- Returns:
- the discovery document | 发现文档
- Throws:
NullPointerException- if issuer is null | 如果 issuer 为 null
-