cookie

package
v1.4.39 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: Apache-2.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 Config

type Config struct {
	Domain   string `json:"domain,omitempty" xml:"domain,omitempty" yaml:"domain,omitempty"`
	Path     string `json:"path,omitempty" xml:"path,omitempty" yaml:"path,omitempty"`
	Lifetime int    `json:"lifetime,omitempty" xml:"lifetime,omitempty" yaml:"lifetime,omitempty"`
	Insecure bool   `json:"insecure,omitempty" xml:"insecure,omitempty" yaml:"insecure,omitempty"`
	SameSite string `json:"same_site,omitempty" xml:"same_site,omitempty" yaml:"same_site,omitempty"`
}

Config represents a common set of configuration settings applicable to the cookies issued by authn.Authenticator.

type Factory

type Factory struct {
	Referer   string `json:"referer,omitempty" xml:"referer,omitempty" yaml:"referer,omitempty"`
	SessionID string `json:"session_id,omitempty" xml:"session_id,omitempty" yaml:"session_id,omitempty"`
	SandboxID string `json:"sandbox_id,omitempty" xml:"sandbox_id,omitempty" yaml:"sandbox_id,omitempty"`
	// contains filtered or unexported fields
}

Factory holds configuration and associated finctions for the cookies issued by authn.Authenticator.

func NewFactory

func NewFactory(c *Config) (*Factory, error)

NewFactory returns an instance of cookie factory.

func (*Factory) GetCookie

func (f *Factory) GetCookie(k, v string) string

GetCookie returns raw cookie string from key-value input.

func (*Factory) GetDeleteCookie

func (f *Factory) GetDeleteCookie(s string) string

GetDeleteCookie returns raw cookie with attributes for delete action.

func (*Factory) GetDeleteSessionCookie

func (f *Factory) GetDeleteSessionCookie() string

GetDeleteSessionCookie returns raw cookie with attributes for delete action for session id cookie.

func (*Factory) GetSessionCookie

func (f *Factory) GetSessionCookie(s string) string

GetSessionCookie return cookie holding session information

Jump to

Keyboard shortcuts

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