Documentation ¶
Index ¶
- Constants
- func IssueToken(subjectID string, notBefore, expiresAt time.Time, privateKey any) (string, error)
- func LoadPrivateKey(path string) (*ecdsa.PrivateKey, error)
- func LoadPublicKey(path string) (*ecdsa.PublicKey, error)
- func ValidateToken(raw string, publicKey any) (subjectID string, err error)
- type Authenticator
- type Issuer
Constants ¶
View Source
const GRPCMetadataTokenKey = "x-standup-token"
Variables ¶
This section is empty.
Functions ¶
func IssueToken ¶
func LoadPrivateKey ¶
func LoadPrivateKey(path string) (*ecdsa.PrivateKey, error)
Types ¶
type Authenticator ¶
type Authenticator interface { Enabled() bool Authenticate(raw string) (subjectID string, err error) }
func NewDisabledAuthenticator ¶
func NewDisabledAuthenticator() Authenticator
func NewStaticAuthenticator ¶
func NewStaticAuthenticator(key *ecdsa.PublicKey) Authenticator
Click to show internal directories.
Click to hide internal directories.