Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrValidatorNotSet = errors.Unauthorized(reason, "basic auth validator is not set") )
Functions ¶
func Client ¶
func Client(opts ...Option) middleware.Middleware
func Server ¶
func Server(opts ...Option) middleware.Middleware
Types ¶
type Option ¶
type Option func(config *options)
func WithAuthentication ¶
WithAuthentication use user specified userName and password for checking
func WithRealm ¶
WithRealm sets the realm attribute of BasicAuth. the realm identifies the system to authenticate against and can be used by clients to save credentials Optional. Default: "Restricted". see https://datatracker.ietf.org/doc/html/rfc2617#section-2
func WithValidator ¶
WithValidator allow user to impl username and passwordCheck
Click to show internal directories.
Click to hide internal directories.