Class OAuth2Client.Builder
java.lang.Object
cloud.opencode.base.oauth2.OAuth2Client.Builder
- Enclosing class:
OAuth2Client
OAuth2Client Builder
OAuth2Client 构建器
- Since:
- JDK 25, opencode-base-oauth2 V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the OAuth2Client 构建 OAuth2ClientSet the client ID 设置客户端 IDclientSecret(String clientSecret) Set the client secret 设置客户端密钥config(OAuth2Config config) Set the configuration 设置配置Set the grant type 设置授权类型httpClient(OAuth2HttpClient httpClient) Set the HTTP client 设置 HTTP 客户端provider(OAuth2Provider provider) Set the provider 设置提供者redirectUri(String redirectUri) Set the redirect URI 设置重定向 URIAdd scopes 添加权限范围tokenStore(TokenStore tokenStore) Set the token store 设置 Token 存储
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
config
Set the configuration 设置配置- Parameters:
config- the configuration | 配置- Returns:
- this builder | 此构建器
-
provider
Set the provider 设置提供者- Parameters:
provider- the provider | 提供者- Returns:
- this builder | 此构建器
-
clientId
Set the client ID 设置客户端 ID- Parameters:
clientId- the client ID | 客户端 ID- Returns:
- this builder | 此构建器
-
clientSecret
Set the client secret 设置客户端密钥- Parameters:
clientSecret- the client secret | 客户端密钥- Returns:
- this builder | 此构建器
-
redirectUri
Set the redirect URI 设置重定向 URI- Parameters:
redirectUri- the redirect URI | 重定向 URI- Returns:
- this builder | 此构建器
-
scopes
Add scopes 添加权限范围- Parameters:
scopes- the scopes | 权限范围- Returns:
- this builder | 此构建器
-
grantType
Set the grant type 设置授权类型- Parameters:
grantType- the grant type | 授权类型- Returns:
- this builder | 此构建器
-
tokenStore
Set the token store 设置 Token 存储- Parameters:
tokenStore- the token store | Token 存储- Returns:
- this builder | 此构建器
-
httpClient
Set the HTTP client 设置 HTTP 客户端- Parameters:
httpClient- the HTTP client | HTTP 客户端- Returns:
- this builder | 此构建器
-
build
-