Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Authentication struct {
// contains filtered or unexported fields
}
Authentication applies login flows to authenticate 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, h miruken.Handler, m httpsrv.Middleware, n func(miruken.Handler), )
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 returns new authentication middleware with the initial login flow definition.
func WithFlowRef ¶
func WithFlowRef(flow string) *FlowBuilder
WithFlowRef returns new authentication middleware with the initial login flow reference.
func (*FlowBuilder) Bearer ¶
func (b *FlowBuilder) Bearer() *Authentication
func (*FlowBuilder) Scheme ¶
func (b *FlowBuilder) Scheme(scheme Scheme) *Authentication
Click to show internal directories.
Click to hide internal directories.