Documentation ¶
Index ¶
Constants ¶
View Source
const ( AuthorizationHeader = "Authorization" XAuthorizationHeader = "X-Authorization" )
Variables ¶
This section is empty.
Functions ¶
func CredentialToContext ¶
func CredentialToContext(ctx context.Context, credential Credential) context.Context
Types ¶
type Authenticator ¶
type Authenticator interface {
Authenticate(Credential) (Credential, error)
}
type AuthenticatorFunc ¶
type AuthenticatorFunc func(Credential) (Credential, error)
func (AuthenticatorFunc) Authenticate ¶
func (a AuthenticatorFunc) Authenticate(credential Credential) (Credential, error)
type Credential ¶
type Credential interface{}
func CredentialFromContext ¶
func CredentialFromContext(ctx context.Context) Credential
func ExtractFromHeader ¶
func ExtractFromHeader(request *http.Request) Credential
type CredentialProvider ¶
type CredentialProvider func() Credential
func FromHeader ¶
func FromHeader(request *http.Request) CredentialProvider
type CredentialSetter ¶
type CredentialSetter func(Credential)
func AddHeader ¶
func AddHeader(request *http.Request) CredentialSetter
Click to show internal directories.
Click to hide internal directories.