sessionservice

package
v0.0.0-...-e31b469 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken

func GetToken(systemID string, accessToken string) (string, *exception.Exception)

GetToken : Find the token from the system session.

func NewGlobal

func NewGlobal(userID string, accessToken string, roles *[]domain.Role) (bool, *exception.Exception)

NewGlobal : Create a global session or update the global session the expire time.

func NewSystem

func NewSystem(systemID string, accessToken string, roles *[]domain.Role) (string, *exception.Exception)

NewSystem : Create a system session or update the system session the expire time.

func VerifySystem

func VerifySystem(systemID string, accessToken string) (string, *exception.Exception)

VerifySystem : Verified the user is login in this system.

Types

type Session

type Session struct {
	UserID string
	Roles  map[string][]domain.Role
}

func VerifyGlobal

func VerifyGlobal(accessToken string) (*Session, *exception.Exception)

VerifyGlobal : Verified the user is login in global, and return this user's role.

Jump to

Keyboard shortcuts

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