session

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Expiration time.Duration
	Keys       webkeys.WebKeysConfig
}

Config - Holds the configuration for the session cookie created after registration or logging in

type Session

type Session struct {
	IdentityID   uuid.UUID `json:"iid"`
	TenantID     uuid.UUID `json:"tid"`
	CredentialID uuid.UUID `json:"cid"`
}

type SessionController added in v0.2.3

type SessionController interface {
	AppendRoutes(router *mux.Router) *mux.Router
}

func NewSessionController added in v0.2.3

func NewSessionController(logger logging.Logger, identities identities.Service, stime stime.TimeService) SessionController

type SessionJwt

type SessionJwt struct {
	jwe.Claims

	Session
}

type SessionService

type SessionService interface {
	Generate(r *http.Request, Session Session) (string, error)
	GenerateCookie(r *http.Request, session Session) (*http.Cookie, error)
}

SessionService - Generates the tokens for their fully logged in session.

func NewSessionService

func NewSessionService(time stime.TimeService, jweService jwe.JWEService, config Config) SessionService

NewSessionService - Creates a default instance of a SessionService

Jump to

Keyboard shortcuts

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