cookies

package
v0.0.0-...-4e1183a Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupAuthToken

func LookupAuthToken(r *http.Request) ([]byte, bool, error)

func SetAuthToken

func SetAuthToken(w http.ResponseWriter, token []byte)

func WithAuthTokenMiddleware

func WithAuthTokenMiddleware(next http.Handler, uc *toggler.UseCases, signInURL string, exceptions []string) http.Handler

Types

type AuthTokenContextKey

type AuthTokenContextKey struct{}

type AuthTokenMiddleware

type AuthTokenMiddleware struct {
	Next       http.Handler
	RedirectTo string
	Doorkeeper interface {
		VerifyTextToken(ctx context.Context, textToken string) (bool, error)
	}
}

func (*AuthTokenMiddleware) ServeHTTP

func (mw *AuthTokenMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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