Documentation ¶
Overview ¶
Package auth provides the authentication methods for the API of the wavepipe media server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoUsername is returned when no username is provided on login ErrNoUsername = errors.New("no username provided") // ErrNoPassword is returned when no password is provided on login ErrNoPassword = errors.New("no password provided") // ErrInvalidPublicKey is returned when an invalid public keyis used to access the API ErrInvalidPublicKey = errors.New("no such public key") // ErrNoSignature is returned when no API signature is provided on all other API calls ErrNoSignature = errors.New("no signature provided") // ErrInvalidSignature is returned when a mismatched API signature is provided ErrInvalidSignature = errors.New("invalid signature provided") // ErrMalformedSignature is returned when a malformed API signature is provided ErrMalformedSignature = errors.New("malformed signature provided") // ErrRepeatedRequest is returned when an API nonce is re-used ErrRepeatedRequest = errors.New("repeated nonce provided") // ErrSessionExpired is returned when the session is expired ErrSessionExpired = errors.New("session expired") )
View Source
var NonceFilter = bloom.New(20000, 5)
NonceFilter is a bloom filter containing all nonce values seen in the past 24 hours. The filter is cleared every 24 hours, because this should be a reasonable enough time to prevent replay attacks.
Functions ¶
This section is empty.
Types ¶
type AuthMethod ¶
AuthMethod represents a method of authenticating with the API
type BcryptAuth ¶
type BcryptAuth struct{}
BcryptAuth represents the bcrypt authentication method, used to log in to the API
type HMACAuth ¶
type HMACAuth struct{}
HMACAuth represents the standard API authentication method, HMAC-SHA1
type SimpleAuth ¶
type SimpleAuth struct{}
SimpleAuth represents the simple authentication method, which can be used by local clients
Click to show internal directories.
Click to hide internal directories.