Documentation
¶
Index ¶
- type TokenServiceImpl
- func (i *TokenServiceImpl) ChangeNamespace(ctx context.Context, in *token.ChangeNamespaceRequest) (*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) RevokeToken(ctx context.Context, in *token.RevokeTokenRequest) (*token.Token, error)
- func (i *TokenServiceImpl) VeliateToken(ctx context.Context, in *token.VeliateTokenRequest) (*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
// policy policy.PermissionService
//自动刷新,直接刷新Token的过期时间,而不是生成一个新的Token
AutoRefresh bool `json:"auto_refresh" toml:"auto_refresh" yaml:"auto_refresh" env:"AUTO_REFRESH" default:"false"`
//刷新TTL
RefreshTTLSecond 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) ChangeNamespace ¶
func (i *TokenServiceImpl) ChangeNamespace(ctx context.Context, in *token.ChangeNamespaceRequest) (*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) RevokeToken ¶
func (i *TokenServiceImpl) RevokeToken(ctx context.Context, in *token.RevokeTokenRequest) (*token.Token, error)
退出接口(销毁Token)
func (*TokenServiceImpl) VeliateToken ¶
func (i *TokenServiceImpl) VeliateToken(ctx context.Context, in *token.VeliateTokenRequest) (*token.Token, error)
校验token 是给内部中间层使用 身份校验层
Click to show internal directories.
Click to hide internal directories.