session

package
v0.0.0-...-f356f3c Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaimUser

type ClaimUser struct {
	UserId    string `json:"user_id"`
	AccountId string `json:"account_id"`
	Username  string `json:"username"`
	Role      string `json:"role"`
	Name      string `json:"name"`
	Email     string `json:"email"`
}

ClaimUser defines the claim user

type Service

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

func NewService

func NewService(log *logger.Logger) *Service

NewService creates a new timeout handler service

func (*Service) SessionCtx

func (svc *Service) SessionCtx(next http.Handler) http.Handler

SessionCtx enriches the request with the captured JWT private claims

type Session

type Session struct {
	AccountId string `json:"account_id"`
	UserEmail string `json:"user_email"`
	UserId    string `json:"user_id"`
	Username  string `json:"username"`
	Role      string `json:"role"`
	Name      string `json:"name"`
}

Session defines the user raw document to be inserted

Jump to

Keyboard shortcuts

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