Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteWWWAuthenticateHeader ¶
func WriteWWWAuthenticateHeader( w http.ResponseWriter, scheme string, realm string, params map[string]string, err error, )
WriteWWWAuthenticateHeader writes the `WWW-Authenticate` http response header for the supplied scheme.
Types ¶
type Authentication ¶
type Authentication struct {
// contains filtered or unexported fields
}
Authentication applies login flows to auth requests.
func (*Authentication) Flow ¶
func (a *Authentication) Flow(flow login.Flow) *FlowBuilder
func (*Authentication) FlowRef ¶
func (a *Authentication) FlowRef(ref string) *FlowBuilder
func (*Authentication) ServeHTTP ¶
func (a *Authentication) ServeHTTP( w http.ResponseWriter, r *http.Request, m httpsrv.Middleware, h miruken.Handler, n func(miruken.Handler), ) error
type Bearer ¶
type Bearer struct {
Realm string
}
Bearer is a http authentication Scheme that uses an opaque string (token) to protect resources.
type FlowBuilder ¶
type FlowBuilder struct {
// contains filtered or unexported fields
}
FlowBuilder configures a login flow.
func WithFlow ¶
func WithFlow(flow login.Flow) *FlowBuilder
WithFlow starts a new authentication flow builder with the definition of a login flow.
func WithFlowRef ¶
func WithFlowRef(flow string) *FlowBuilder
WithFlowRef starts a new authentication flow builder with a reference to a login flow.
func (*FlowBuilder) Bearer ¶
func (b *FlowBuilder) Bearer() *Authentication
Bearer configures an authentication flow to use `Bearer` tokens.
func (*FlowBuilder) BearerInRealm ¶
func (b *FlowBuilder) BearerInRealm(realm string) *Authentication
BearerInRealm configures an authentication flow to use `Bearer` tokens in the supplied realm.
func (*FlowBuilder) Scheme ¶
func (b *FlowBuilder) Scheme(scheme Scheme) *Authentication
Click to show internal directories.
Click to hide internal directories.