Documentation
¶
Index ¶
Constants ¶
const BasicAuthnFilterName string = "BasicAuthnFilter"
BasicAuthnFilterName is the name of the basic authentication filter
const BearerAuthnFilterName string = "BearerAuthnFilter"
BearerAuthnFilterName is the name of the bearer authentication filter
const RequiredAuthenticationFilterName = "RequiredAuthenticationFilter"
RequiredAuthenticationFilterName is the name of RequiredAuthenticationFilter
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicAuthnFilter ¶
type BasicAuthnFilter struct {
Middleware
}
BasicAuthnFilter performs Basic authentication by validating the Authorization header
func NewBasicAuthnFilter ¶
func NewBasicAuthnFilter(storage storage.Credentials, encrypter security.Encrypter) *BasicAuthnFilter
NewBasicAuthnFilter returns a BasicAuthnFilter using the provided credentials storage in order to validate the credentials
func (*BasicAuthnFilter) FilterMatchers ¶
func (ba *BasicAuthnFilter) FilterMatchers() []web.FilterMatcher
FilterMatchers implements the web.Filter interface and returns the conditions on which the filter should be executed
func (*BasicAuthnFilter) Name ¶
func (ba *BasicAuthnFilter) Name() string
Name implements the web.Filter interface and returns the identifier of the filter
type BearerAuthnFilter ¶
type BearerAuthnFilter struct {
Middleware
}
BearerAuthnFilter performs Bearer authentication by validating the Authorization header
func NewBearerAuthnFilter ¶
func NewBearerAuthnFilter(ctx context.Context, tokenIssuer, clientID string) (*BearerAuthnFilter, error)
NewBearerAuthnFilter returns a BearerAuthnFilter
func (*BearerAuthnFilter) FilterMatchers ¶
func (ba *BearerAuthnFilter) FilterMatchers() []web.FilterMatcher
FilterMatchers implements the web.Filter interface and returns the conditions on which the filter should be executed
func (*BearerAuthnFilter) Name ¶
func (ba *BearerAuthnFilter) Name() string
Name implements the web.Filter interface and returns the identifier of the filter
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware type represents an authentication middleware
type RequiredAuthnFilter ¶
type RequiredAuthnFilter struct {
}
RequiredAuthnFilter type verifies that authentication has been performed for APIs that are secured
func NewRequiredAuthnFilter ¶
func NewRequiredAuthnFilter() *RequiredAuthnFilter
NewRequiredAuthnFilter returns RequiredAuthnFilter
func (*RequiredAuthnFilter) FilterMatchers ¶
func (raf *RequiredAuthnFilter) FilterMatchers() []web.FilterMatcher
FilterMatchers implements the web.Filter interface and returns the conditions on which the filter should be executed
func (*RequiredAuthnFilter) Name ¶
func (raf *RequiredAuthnFilter) Name() string
Name implements the web.Filter interface and returns the identifier of the filter