session

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CGISessionParser

type CGISessionParser struct {
	MethodHead      string
	SchemeHead      string
	URIHead         string
	IPHead          string
	UAHead          string
	TokenCookieName string
	Auther          *crypto.Auth
}

func (*CGISessionParser) ParseSession

func (sp *CGISessionParser) ParseSession(ctx *fiber.Ctx) *Session

ParseSession parses a session from the fiber.Ctx.

type SSOSessionParser

type SSOSessionParser struct {
	IPHead          string
	TokenCookieName string
	Auther          *crypto.Auth
}

func (*SSOSessionParser) ParseSession

func (sp *SSOSessionParser) ParseSession(ctx *fiber.Ctx) *Session

ParseSession parses a session from the fiber.Ctx.

type Session

type Session struct {
	Method     string
	URI        *fasthttp.URI
	IP         string
	UserAgent  string
	Authorized bool
	Sub        string
	Exp        time.Time
}

func (*Session) Query

func (s *Session) Query(key string) []byte

type SessionParser

type SessionParser struct {
	SsoHost string
	// contains filtered or unexported fields
}

func NewSessionParser

func NewSessionParser(conf *config.Server) *SessionParser

NewSessionParser creates a new SessionParser instance. TODO: Use the provided configuration to create a new SessionParser instance.

func (*SessionParser) CGIAuther

func (sp *SessionParser) CGIAuther() *crypto.Auth

func (*SessionParser) Parse

func (sp *SessionParser) Parse(ctx *fiber.Ctx) *Session

func (*SessionParser) SSOAuther

func (sp *SessionParser) SSOAuther() *crypto.Auth

Jump to

Keyboard shortcuts

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