Documentation
¶
Index ¶
- Constants
- func CalculateHMACSignature(secret []byte, username string, expire int64) []byte
- func VerifyHMACLoginAndPassword(secret []byte, login, password string) bool
- type Auth
- type BasicAuth
- type CertAuth
- type HMACAuth
- type HMACToken
- type NoAuth
- type RedisAuth
- type RejectHTTPAuth
- type StaticRejectAuth
Constants ¶
View Source
const ( HMACSignaturePrefix = "dumbproxy grant token v1" HMACSignatureSize = 32 HMACTimestampSize = 8 EnvVarHMACSecret = "DUMBPROXY_HMAC_SECRET" )
View Source
const AUTH_REQUIRED_MSG = "Proxy authentication required.\n"
View Source
const AUTH_TRIGGERED_MSG = "Browser auth triggered!\n"
View Source
const BAD_REQ_MSG = "Bad Request\n"
View Source
const EPOCH_EXPIRE = "Thu, 01 Jan 1970 00:00:01 GMT"
Variables ¶
This section is empty.
Functions ¶
func CalculateHMACSignature ¶ added in v1.14.0
func VerifyHMACLoginAndPassword ¶ added in v1.14.1
Types ¶
type Auth ¶
type BasicAuth ¶
type BasicAuth struct {
// contains filtered or unexported fields
}
func NewBasicFileAuth ¶
func NewStaticAuth ¶
type CertAuth ¶
type CertAuth struct {
// contains filtered or unexported fields
}
func NewCertAuth ¶
type HMACAuth ¶ added in v1.14.0
type HMACAuth struct {
// contains filtered or unexported fields
}
func NewHMACAuth ¶ added in v1.14.0
type HMACToken ¶ added in v1.14.0
type HMACToken struct {
Expire int64
Signature [HMACSignatureSize]byte
}
type RedisAuth ¶ added in v1.27.0
type RedisAuth struct {
// contains filtered or unexported fields
}
func NewRedisAuth ¶ added in v1.27.0
type RejectHTTPAuth ¶ added in v1.37.0
type RejectHTTPAuth struct {
// contains filtered or unexported fields
}
func NewRejectHTTPAuth ¶ added in v1.37.0
func NewRejectHTTPAuth(u *url.URL, logger *clog.CondLogger) (*RejectHTTPAuth, error)
func (*RejectHTTPAuth) Close ¶ added in v1.38.0
func (_ *RejectHTTPAuth) Close() error
func (*RejectHTTPAuth) Valid ¶ added in v1.37.0
func (_ *RejectHTTPAuth) Valid(_, _, _ string) bool
type StaticRejectAuth ¶ added in v1.37.0
type StaticRejectAuth struct {
// contains filtered or unexported fields
}
func NewStaticRejectAuth ¶ added in v1.37.0
func NewStaticRejectAuth(u *url.URL, logger *clog.CondLogger) (*StaticRejectAuth, error)
func (*StaticRejectAuth) Close ¶ added in v1.38.0
func (_ *StaticRejectAuth) Close() error
func (*StaticRejectAuth) Valid ¶ added in v1.37.0
func (_ *StaticRejectAuth) Valid(_, _, _ string) bool
Click to show internal directories.
Click to hide internal directories.