Discover Packages
github.com/target/goalert
auth
authtoken
package
Version:
v0.33.0
Opens a new window with list of versions in this module.
Published: Nov 19, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
A SignFunc will return a signature for the given payload.
Token represents an authentication token.
Parse will parse a token string, optionally verifying it's signature.
If verifyFn is nil, the signature is ignored.
Encode will return a signed, URL-safe string representation of the token.
If signFn is nil, the signature will be omitted.
Type represents the type of an authentication token.
const (
TypeUnknown Type = iota
TypeSession
TypeCalSub
TypeUIK
)
Available valid token types.
type VerifyFunc func(t Type , payload, signature []byte ) (isValid, isOldKey bool )
A VerifyFunc will verify that the signature is valid for the given type and payload. Additionally,
if supported, it indicates if an old-but-still-valid key (since been rotated) was used
to generate the signature.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.