Documentation ¶
Index ¶
- type TokenServiceImpl
- func (i *TokenServiceImpl) ChangeNamespce(ctx context.Context, in *token.ChangeNamespceRequest) (*token.Token, error)
- func (i *TokenServiceImpl) DescribeToken(ctx context.Context, in *token.DescribeTokenRequest) (*token.Token, error)
- func (i *TokenServiceImpl) Init() error
- func (i *TokenServiceImpl) IssueToken(ctx context.Context, in *token.IssueTokenRequest) (*token.Token, error)
- func (i *TokenServiceImpl) Name() string
- func (i *TokenServiceImpl) QueryToken(ctx context.Context, in *token.QueryTokenRequest) (*types.Set[*token.Token], error)
- func (i *TokenServiceImpl) RevolkToken(ctx context.Context, in *token.RevolkTokenRequest) (*token.Token, error)
- func (i *TokenServiceImpl) ValiateToken(ctx context.Context, req *token.ValiateTokenRequest) (*token.Token, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenServiceImpl ¶
type TokenServiceImpl struct { ioc.ObjectImpl // 自动刷新, 直接刷新Token的过期时间,而不是生成一个新Token AutoRefresh bool `json:"auto_refresh" toml:"auto_refresh" yaml:"auto_refresh" env:"AUTO_REFRESH"` // 刷新TTL RereshTTLSecond uint64 `json:"refresh_ttl" toml:"refresh_ttl" yaml:"refresh_ttl" env:"REFRESH_TTL"` // Api最多多少个 MaxActiveApiToken uint8 `json:"max_active_api_token" toml:"max_active_api_token" yaml:"max_active_api_token" env:"MAX_ACTIVE_API_TOKEN"` // contains filtered or unexported fields }
func (*TokenServiceImpl) ChangeNamespce ¶
func (i *TokenServiceImpl) ChangeNamespce(ctx context.Context, in *token.ChangeNamespceRequest) (*token.Token, error)
用户切换空间
func (*TokenServiceImpl) DescribeToken ¶
func (i *TokenServiceImpl) DescribeToken(ctx context.Context, in *token.DescribeTokenRequest) (*token.Token, error)
func (*TokenServiceImpl) Init ¶
func (i *TokenServiceImpl) Init() error
func (*TokenServiceImpl) IssueToken ¶
func (i *TokenServiceImpl) IssueToken(ctx context.Context, in *token.IssueTokenRequest) (*token.Token, error)
登录接口(颁发Token)
func (*TokenServiceImpl) Name ¶
func (i *TokenServiceImpl) Name() string
func (*TokenServiceImpl) QueryToken ¶
func (i *TokenServiceImpl) QueryToken(ctx context.Context, in *token.QueryTokenRequest) (*types.Set[*token.Token], error)
查询已经颁发出去的Token
func (*TokenServiceImpl) RevolkToken ¶
func (i *TokenServiceImpl) RevolkToken(ctx context.Context, in *token.RevolkTokenRequest) (*token.Token, error)
退出接口(销毁Token)
func (*TokenServiceImpl) ValiateToken ¶
func (i *TokenServiceImpl) ValiateToken(ctx context.Context, req *token.ValiateTokenRequest) (*token.Token, error)
校验Token 是给内部中间层使用 身份校验层
Click to show internal directories.
Click to hide internal directories.