Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultTokenProvider ¶
type DefaultTokenProvider struct {
// contains filtered or unexported fields
}
DefaultTokenProvider is the defaul implementation of the TokenProvider interface.
func NewDefaultTokenProvider ¶
func NewDefaultTokenProvider(maximumTokenDuration time.Duration, key []byte, debug bool) *DefaultTokenProvider
NewDefaultTokenProvider creates a new instance of the default TokenProvider interface implementation.
func (*DefaultTokenProvider) GenerateToken ¶
GenerateToken token based on provided input string and timestamp.
func (*DefaultTokenProvider) ValidateToken ¶
func (d *DefaultTokenProvider) ValidateToken(token, handler string, timestamp time.Time) (bool, error)
ValidateToken decodes toekn and returns true if the token is (still) valid.
Click to show internal directories.
Click to hide internal directories.