cognito

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

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

Variables

This section is empty.

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) Name added in v0.2.2

func (s *Service) Name() string

func (*Service) Value

func (s *Service) Value(ctx context.Context, raw interface{}, options ...interface{}) (interface{}, error)

func (*Service) Valuer added in v0.2.2

func (s *Service) Valuer() codec.Valuer

Jump to

Keyboard shortcuts

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