server

package
v0.1.124 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthenticationHandler

func NewAuthenticationHandler(tokenValidator TokenValidator, nextHandler http.Handler) http.Handler

func NewRequestHandler

func NewRequestHandler(store store.Store, valueGeneratorFactory types.ValueGeneratorFactory) (http.Handler, error)

func NewX509Loader

func NewX509Loader(store store.Store) types.CertsLoader

Types

type ConfigServer

type ConfigServer interface {
	Start() error
}

func NewConfigServer

func NewConfigServer(config config.ServerConfig) ConfigServer

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

func NewErrorResponse

func NewErrorResponse(err error) ErrorResponse

func (ErrorResponse) GenerateErrorMsg

func (e ErrorResponse) GenerateErrorMsg() string

type JwtTokenValidator

type JwtTokenValidator struct {
	// contains filtered or unexported fields
}

func NewJWTTokenValidatorWithKey

func NewJWTTokenValidatorWithKey(verificationKey *rsa.PublicKey) JwtTokenValidator

func NewJwtTokenValidator

func NewJwtTokenValidator(jwtVerificationKeyPath string) (JwtTokenValidator, error)

func (JwtTokenValidator) Validate

func (j JwtTokenValidator) Validate(tokenStr string) error

type TokenValidator

type TokenValidator interface {
	Validate(token string) error
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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