webservice

package
v0.0.0-...-a34ed3a Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthTokenMiddleWare

func AuthTokenMiddleWare(logger *logpkg.Logger, hmacSecret []byte) func(http.Handler) http.Handler

func RootTokenMiddleware

func RootTokenMiddleware(logger *logpkg.Logger, bcryptHashedRootToken []byte) func(http.Handler) http.Handler

RootTokenMiddleware is a middleware that checks for a fixed password

Types

type CreateTokenFunc

type CreateTokenFunc func(accountID int64, name string, roleIDs []int64) (*gotoken.Token, errorsx.Error)

type TokenService

type TokenService struct {
	chi.Router
	// contains filtered or unexported fields
}

func NewTokenService

func NewTokenService(logger *logpkg.Logger, createTokenFunc CreateTokenFunc, hmacSecret []byte) *TokenService

Jump to

Keyboard shortcuts

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