service

package
v0.0.0-...-3301e3d Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AccessTokenClaimsKey is the key in the request
	// context object for access token claims
	AccessTokenClaimsKey = ctxKey("access-claims")
)

Functions

func GetClaims

func GetClaims(r *http.Request) *auth.CustomClaims

GetClaims returns the claims in a context object

Types

type Service

type Service struct {
	Router *mux.Router
	// contains filtered or unexported fields
}

Service holds the service configuration necessary for endpoints to respond to requests

func NewPadlService

func NewPadlService(c *config.Config) *Service

NewPadlService returns an HTTP router multiplexer with attached handler functions

func (*Service) Auth

func (s *Service) Auth(h http.HandlerFunc, allowedAuds ...string) http.Handler

Auth wraps an HTTP handler function and populates the access token claims object in the req ctx

Jump to

Keyboard shortcuts

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