Class IntrospectionResult.Builder

java.lang.Object
cloud.opencode.base.oauth2.introspection.IntrospectionResult.Builder
Enclosing class:
IntrospectionResult

public static class IntrospectionResult.Builder extends Object
IntrospectionResult Builder IntrospectionResult 构建器

Provides a fluent API for constructing IntrospectionResult instances.

提供用于构建 IntrospectionResult 实例的流式 API。

Since:
JDK 25, opencode-base-oauth2 V1.0.3
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • active

      public IntrospectionResult.Builder active(boolean active)
      Set the active status. 设置活跃状态。
      Parameters:
      active - whether the token is active | Token 是否活跃
      Returns:
      this builder | 此构建器
    • scope

      public IntrospectionResult.Builder scope(String scope)
      Set the scope. 设置权限范围。
      Parameters:
      scope - the scope string (space-delimited) | 权限范围字符串(空格分隔)
      Returns:
      this builder | 此构建器
    • clientId

      public IntrospectionResult.Builder clientId(String clientId)
      Set the client ID. 设置客户端 ID。
      Parameters:
      clientId - the client ID | 客户端 ID
      Returns:
      this builder | 此构建器
    • username

      public IntrospectionResult.Builder username(String username)
      Set the username. 设置用户名。
      Parameters:
      username - the username | 用户名
      Returns:
      this builder | 此构建器
    • tokenType

      public IntrospectionResult.Builder tokenType(String tokenType)
      Set the token type. 设置 Token 类型。
      Parameters:
      tokenType - the token type | Token 类型
      Returns:
      this builder | 此构建器
    • exp

      Set the expiration time. 设置过期时间。
      Parameters:
      exp - the expiration instant | 过期时间
      Returns:
      this builder | 此构建器
    • iat

      Set the issued-at time. 设置签发时间。
      Parameters:
      iat - the issued-at instant | 签发时间
      Returns:
      this builder | 此构建器
    • nbf

      Set the not-before time. 设置生效时间。
      Parameters:
      nbf - the not-before instant | 生效时间
      Returns:
      this builder | 此构建器
    • sub

      Set the subject. 设置主体。
      Parameters:
      sub - the subject identifier | 主体标识符
      Returns:
      this builder | 此构建器
    • aud

      Set the audience. 设置受众。
      Parameters:
      aud - the audience | 受众
      Returns:
      this builder | 此构建器
    • iss

      Set the issuer. 设置颁发者。
      Parameters:
      iss - the issuer | 颁发者
      Returns:
      this builder | 此构建器
    • jti

      Set the JWT ID. 设置 JWT ID。
      Parameters:
      jti - the JWT ID | JWT ID
      Returns:
      this builder | 此构建器
    • claims

      public IntrospectionResult.Builder claims(Map<String,Object> claims)
      Set additional claims. 设置附加声明。
      Parameters:
      claims - the claims map | 声明映射
      Returns:
      this builder | 此构建器
    • build

      public IntrospectionResult build()
      Build the IntrospectionResult. 构建 IntrospectionResult。
      Returns:
      the introspection result | 内省结果