Files
kubesphere/pkg/api/auth/token/issuer.go
hongming b9bdcd824c update
Signed-off-by: hongming <talonwan@yunify.com>
2020-03-22 04:29:06 +08:00

11 lines
364 B
Go

package token
// Issuer issues token to user, tokens are required to perform mutating requests to resources
type Issuer interface {
// IssueTo issues a token a User, return error if issuing process failed
IssueTo(User) (string, error)
// Verify verifies a token, and return a User if it's a valid token, otherwise return error
Verify(string) (User, error)
}