Class DiscoveryDocument.Builder

java.lang.Object
cloud.opencode.base.oauth2.discovery.DiscoveryDocument.Builder
Enclosing class:
DiscoveryDocument

public static final class DiscoveryDocument.Builder extends Object
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 Details

    • issuer

      public DiscoveryDocument.Builder issuer(String issuer)
      Set the issuer identifier. 设置颁发者标识符。
      Parameters:
      issuer - the issuer URL | 颁发者 URL
      Returns:
      this builder | 此构建器
    • authorizationEndpoint

      public DiscoveryDocument.Builder authorizationEndpoint(String authorizationEndpoint)
      Set the authorization endpoint. 设置授权端点。
      Parameters:
      authorizationEndpoint - the authorization endpoint URL | 授权端点 URL
      Returns:
      this builder | 此构建器
    • tokenEndpoint

      public DiscoveryDocument.Builder tokenEndpoint(String tokenEndpoint)
      Set the token endpoint. 设置令牌端点。
      Parameters:
      tokenEndpoint - the token endpoint URL | 令牌端点 URL
      Returns:
      this builder | 此构建器
    • userinfoEndpoint

      public DiscoveryDocument.Builder userinfoEndpoint(String userinfoEndpoint)
      Set the userinfo endpoint. 设置用户信息端点。
      Parameters:
      userinfoEndpoint - the userinfo endpoint URL | 用户信息端点 URL
      Returns:
      this builder | 此构建器
    • jwksUri

      public DiscoveryDocument.Builder jwksUri(String jwksUri)
      Set the JWKS URI. 设置 JWKS URI。
      Parameters:
      jwksUri - the JWKS URI | JWKS URI
      Returns:
      this builder | 此构建器
    • registrationEndpoint

      public DiscoveryDocument.Builder registrationEndpoint(String registrationEndpoint)
      Set the registration endpoint. 设置注册端点。
      Parameters:
      registrationEndpoint - the registration endpoint URL | 注册端点 URL
      Returns:
      this builder | 此构建器
    • revocationEndpoint

      public DiscoveryDocument.Builder revocationEndpoint(String revocationEndpoint)
      Set the revocation endpoint. 设置撤销端点。
      Parameters:
      revocationEndpoint - the revocation endpoint URL | 撤销端点 URL
      Returns:
      this builder | 此构建器
    • introspectionEndpoint

      public DiscoveryDocument.Builder introspectionEndpoint(String introspectionEndpoint)
      Set the introspection endpoint. 设置内省端点。
      Parameters:
      introspectionEndpoint - the introspection endpoint URL | 内省端点 URL
      Returns:
      this builder | 此构建器
    • deviceAuthorizationEndpoint

      public DiscoveryDocument.Builder deviceAuthorizationEndpoint(String deviceAuthorizationEndpoint)
      Set the device authorization endpoint. 设置设备授权端点。
      Parameters:
      deviceAuthorizationEndpoint - the device authorization endpoint URL | 设备授权端点 URL
      Returns:
      this builder | 此构建器
    • parEndpoint

      public DiscoveryDocument.Builder parEndpoint(String parEndpoint)
      Set the pushed authorization request endpoint. 设置推送授权请求端点。
      Parameters:
      parEndpoint - the PAR endpoint URL | PAR 端点 URL
      Returns:
      this builder | 此构建器
    • scopesSupported

      public DiscoveryDocument.Builder scopesSupported(List<String> scopesSupported)
      Set the supported scopes. 设置支持的权限范围。
      Parameters:
      scopesSupported - the list of supported scopes | 支持的权限范围列表
      Returns:
      this builder | 此构建器
    • responseTypesSupported

      public DiscoveryDocument.Builder responseTypesSupported(List<String> responseTypesSupported)
      Set the supported response types. 设置支持的响应类型。
      Parameters:
      responseTypesSupported - the list of supported response types | 支持的响应类型列表
      Returns:
      this builder | 此构建器
    • grantTypesSupported

      public DiscoveryDocument.Builder grantTypesSupported(List<String> 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

      public DiscoveryDocument build()
      Build the DiscoveryDocument. 构建 DiscoveryDocument。
      Returns:
      the discovery document | 发现文档
      Throws:
      NullPointerException - if issuer is null | 如果 issuer 为 null