consolewebauth

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CookieAuth

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

CookieAuth handles cookie authorization.

func NewCookieAuth

func NewCookieAuth(settings CookieSettings) *CookieAuth

NewCookieAuth create new cookie authorization with provided settings.

func (*CookieAuth) GetToken

func (auth *CookieAuth) GetToken(r *http.Request) (string, error)

GetToken retrieves token from request.

func (*CookieAuth) RemoveTokenCookie added in v0.31.6

func (auth *CookieAuth) RemoveTokenCookie(w http.ResponseWriter)

RemoveTokenCookie removes auth cookie that is not accessible from js.

func (*CookieAuth) SetTokenCookie

func (auth *CookieAuth) SetTokenCookie(w http.ResponseWriter, token string)

SetTokenCookie sets parametrized token cookie that is not accessible from js.

type CookieSettings

type CookieSettings struct {
	Name string
	Path string
}

CookieSettings variable cookie settings.

Jump to

Keyboard shortcuts

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