Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashPassword ¶
HashPassword takes a password and returns the hash
func PasswordMatches ¶
PasswordMatches takes a hash and a password and validates if they match
Types ¶
type TokenManager ¶
type TokenManager struct {
// contains filtered or unexported fields
}
func NewTokenManager ¶
func NewTokenManager(key string) TokenManager
func (TokenManager) CreateToken ¶
func (t TokenManager) CreateToken(username string) (string, error)
func (TokenManager) ValidateAuthInterceptor ¶
func (t TokenManager) ValidateAuthInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
func (TokenManager) ValidateToken ¶
func (t TokenManager) ValidateToken(token string) error
Click to show internal directories.
Click to hide internal directories.