cognito

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderAuthorization = "Authorization"
	HeaderCookie        = "Set-Cookie"
	AuthTypeBasic       = "basic"
	AuthTypeBearer      = "bearer"
)

Variables

View Source
var EmbedFs embed.FS

Functions

This section is empty.

Types

type Config

type Config struct {
	cognito.Config
	AuthCookie string
	SignInURL  string
}

Config represents a config

func (*Config) Init

func (c *Config) Init()

type Service

type Service struct {
	Config *Config
	*cognito.Service
	// contains filtered or unexported fields
}

func New

func New(config *Config, fs afs.Service, efs *embed.FS) (*Service, error)

func (*Service) Auth

func (s *Service) Auth(next http.HandlerFunc) http.HandlerFunc

func (*Service) Authorize

func (s *Service) Authorize(writer http.ResponseWriter, request *http.Request) bool

func (*Service) Name

func (s *Service) Name() string

Jump to

Keyboard shortcuts

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