middleware

package
v1.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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(next http.Handler) http.Handler

HTTPBasicAuth http basic auth middleware

func (*Middleware) HTTPBearerAuth

func (m *Middleware) HTTPBearerAuth(next http.Handler) http.Handler

HTTPBearerAuth http jwt token middleware

func (*Middleware) HTTPMultipleAuth

func (m *Middleware) HTTPMultipleAuth(next http.Handler) http.Handler

HTTPMultipleAuth mix basic & bearer auth

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL