Documentation ¶
Overview ¶
Package credential provides different types of credentials for authentication.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingCredential = customerror.NewMissingError("credential", "", nil) ErrUsernamePasswordRequired = customerror.NewRequiredError("username, and password are", "", nil) )
Functions ¶
This section is empty.
Types ¶
type BasicAuth ¶
type BasicAuth struct { Username string `json:"username" validate:"required,gte=3"` Password string `json:"password" validate:"required,gte=3"` }
BasicAuth is the basic authentication credential definition.
See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#basic_authentication_scheme
func NewBasicAuth ¶
NewBasicAuth is the BasicAuth factory.
func NewBasicAuthFromText ¶
NewBasicAuthFromText is a BasicAuth factory that automatically parses `credential` from text.
Click to show internal directories.
Click to hide internal directories.