middlewares

package
v0.0.0-...-0fc1b25 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

type Identity struct {
	KratosClient *kratosClient.APIClient
}

Identity middleware checks if current session of received request is active, it then saves the result and logoutURL to the request context.

func (*Identity) Apply

func (mw *Identity) Apply(next http.Handler) http.HandlerFunc

Apply logs request before passing it to http.Handler

func (*Identity) ApplyFn

func (mw *Identity) ApplyFn(next http.HandlerFunc) http.HandlerFunc

ApplyFn will try to set to Session Active value and appropriate LogoutURL to request context before passing it to the HandleFunc.

Jump to

Keyboard shortcuts

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