localauth

package
v0.14.7 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package localauth contains authentication logic for use in local development.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

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

Authenticator is an authenticator used in local development. In local development, we decode the JWT provided by the user. In production, we use AWS API Gateway to do this.

func New

func New(ctx context.Context, opts Opts) (*Authenticator, error)

New creates a new Authenticator.

func (*Authenticator) Authenticate

func (a *Authenticator) Authenticate(r *http.Request) (*auth.Claims, error)

Authenticate is used in development to get a user from a HWT identity token. In local development we parse the JWT provided by the user.

type Opts

type Opts struct {
	CognitoRegion string
	UserPoolID    string
}

Jump to

Keyboard shortcuts

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