Documentation ¶
Index ¶
- Constants
- type Middleware
- func (m *Middleware) Basic(ctx context.Context, key string) error
- func (m *Middleware) Bearer(ctx context.Context, tokenString string) (*candishared.TokenClaim, error)
- func (m *Middleware) GRPCBasicAuth(ctx context.Context) context.Context
- func (m *Middleware) GRPCBearerAuth(ctx context.Context) context.Context
- func (m *Middleware) GraphQLBasicAuth(ctx context.Context) context.Context
- func (m *Middleware) GraphQLBearerAuth(ctx context.Context) context.Context
- func (m *Middleware) HTTPBasicAuth(showAlert bool) echo.MiddlewareFunc
- func (m *Middleware) HTTPBearerAuth() echo.MiddlewareFunc
- func (m *Middleware) HTTPMultipleAuth() echo.MiddlewareFunc
Constants ¶
View Source
const (
// Basic constanta
Basic = "basic"
)
View Source
const (
// Bearer constanta
Bearer = "bearer"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware impl
func NewMiddleware ¶
func NewMiddleware(tokenValidator interfaces.TokenValidator) *Middleware
NewMiddleware create new middleware instance
func (*Middleware) Basic ¶
func (m *Middleware) Basic(ctx context.Context, key string) error
Basic function basic auth
func (*Middleware) Bearer ¶
func (m *Middleware) Bearer(ctx context.Context, tokenString string) (*candishared.TokenClaim, error)
Bearer token validator
func (*Middleware) GRPCBasicAuth ¶
func (m *Middleware) GRPCBasicAuth(ctx context.Context) context.Context
GRPCBasicAuth method
func (*Middleware) GRPCBearerAuth ¶
func (m *Middleware) GRPCBearerAuth(ctx context.Context) context.Context
GRPCBearerAuth method
func (*Middleware) GraphQLBasicAuth ¶
func (m *Middleware) GraphQLBasicAuth(ctx context.Context) context.Context
GraphQLBasicAuth for graphql resolver
func (*Middleware) GraphQLBearerAuth ¶
func (m *Middleware) GraphQLBearerAuth(ctx context.Context) context.Context
GraphQLBearerAuth for graphql resolver
func (*Middleware) HTTPBasicAuth ¶
func (m *Middleware) HTTPBasicAuth(showAlert bool) echo.MiddlewareFunc
HTTPBasicAuth http basic auth middleware
func (*Middleware) HTTPBearerAuth ¶
func (m *Middleware) HTTPBearerAuth() echo.MiddlewareFunc
HTTPBearerAuth http jwt token middleware
func (*Middleware) HTTPMultipleAuth ¶
func (m *Middleware) HTTPMultipleAuth() echo.MiddlewareFunc
HTTPMultipleAuth mix basic & bearer auth
Click to show internal directories.
Click to hide internal directories.