session

package
v0.0.0-...-5df0669 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetAuthorizationSessions

func SetAuthorizationSessions(sessions Sessions) error

Types

type Session

type Session struct {
	State        string
	AuthReqUrl   string    `yaml:"auth_req_url" mapstructure:"auth_req_url"`
	ServerSlug   string    `yaml:"server_slug" mapstructure:"server_slug"`
	ClientSlug   string    `yaml:"client_slug" mapstructure:"client_slug"`
	CodeVerifier string    `yaml:"code_verifier" mapstructure:"code_verifier"`
	CreatedAt    time.Time `yaml:"created_at" mapstructure:"created_at"`
	ExpiresAt    time.Time `yaml:"expires_at" mapstructure:"expires_at"`
	CompletedAt  time.Time `yaml:"completed_at" mapstructure:"completed_at"`
}

func NewSession

func NewSession(state string, authReqUrl url.URL, serverSlug, clientSlug string, codeVerifier string) Session

func (Session) GetRedirectUri

func (s Session) GetRedirectUri() (string, error)

func (Session) IsExpired

func (s Session) IsExpired() bool

func (Session) Save

func (s Session) Save() error

type Sessions

type Sessions []Session

func GetAuthorizationSessions

func GetAuthorizationSessions() (Sessions, error)

func (Sessions) FindByState

func (ss Sessions) FindByState(state string) (Session, bool)

Jump to

Keyboard shortcuts

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