my

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: MPL-2.0, MPL-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Store adapter

Store is the package state variable which contains database connections

Functions

func ChangePassword

func ChangePassword(w http.ResponseWriter, r *http.Request)

ChangePassword is same as FirstTimePasswordSetup except for this handler is passed through session validation and user details are taked from user session Context

func FileDeleteHandler

func FileDeleteHandler(w http.ResponseWriter, r *http.Request)

func FileDownloadHandler

func FileDownloadHandler(w http.ResponseWriter, r *http.Request)

func FileUploadHandler

func FileUploadHandler(w http.ResponseWriter, r *http.Request)

func FirstTimePasswordSetup

func FirstTimePasswordSetup(w http.ResponseWriter, r *http.Request)

FirstTimePasswordSetup used in case of forget password and after user account is created for first time. Any change password process in active user session should use ChangePassword instead

func ForgotPassword

func ForgotPassword(w http.ResponseWriter, r *http.Request)

ForgotPassword starts forgot password process

func GenerateKeyPair

func GenerateKeyPair(w http.ResponseWriter, r *http.Request)

func GetAuthMeta

func GetAuthMeta(w http.ResponseWriter, r *http.Request)

Get authentication metada like isPasswordRequired, isDeviceHygeneRequired etc They should be verified later when user authenticate This API is called just for the UI

func GetDownloadableFileList

func GetDownloadableFileList(w http.ResponseWriter, r *http.Request)

func GetFileDownloadToken

func GetFileDownloadToken(w http.ResponseWriter, r *http.Request)

func GetMyDetail

func GetMyDetail(w http.ResponseWriter, r *http.Request)

GetMyDetail returns current user details

func GetMyEvents

func GetMyEvents(w http.ResponseWriter, r *http.Request)

func GetMyEventsByPage

func GetMyEventsByPage(w http.ResponseWriter, r *http.Request)

func GetMyServicesDetail

func GetMyServicesDetail(w http.ResponseWriter, r *http.Request)

GetMyServicesDetail retrieves services assigned to current user including permission/policy details

func InitStore

func InitStore(con *global.State)

InitStore initialises package state

func MyAccountDetails

func MyAccountDetails(w http.ResponseWriter, r *http.Request)

func RemoveMyDevice added in v1.1.2

func RemoveMyDevice(w http.ResponseWriter, r *http.Request)

RemoveUserDevice removes user device

func VerifyAccount

func VerifyAccount(w http.ResponseWriter, r *http.Request)

VerifyAccount does two things. validate verify account link. If the link is valid and is not expired, respond with success value with intent of setup password. Dashboard ui should then present set password dialogue and send request to FirstTimePasswordSetup handler. Format for validation link: http://trasa.seknox.com/verify/{link}

Types

type AuthMetaResp

type AuthMetaResp struct {
	IsPasswordRequired     bool   `json:"isPasswordRequired"`
	IsDeviceHygeneRequired bool   `json:"isDeviceHygeneRequired"`
	TrasaID                string `json:"trasaID"`
}

type MyServiceDetail

type MyServiceDetail struct {
	User       models.User               `json:"user"`
	MyServices []models.MyServiceDetails `json:"myServices"`
}

type SingleUserDetailV2

type SingleUserDetailV2 struct {
	User             models.User         `json:"user"`
	AssignedServices []models.Service    `json:"userAccessMaps"`
	UserDevices      []models.UserDevice `json:"userDevices"`
	UserGroups       []models.Group      `json:"userGroups"`
}

Jump to

Keyboard shortcuts

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