Documentation ¶
Index ¶
- Variables
- func DeviceDetailPipe(w http.ResponseWriter, r *http.Request)
- func GetBrsrDetails(w http.ResponseWriter, r *http.Request)
- func GiveMeDeviceDetail(orgID, userID, deviceID, totpSec string)
- func InitStore(state *global.State)
- func IsKnownExts(extID string) bool
- func PassMyDeviceDetail(w http.ResponseWriter, r *http.Request)
- type DeviceEnrollResp
- type EnrolDeviceStruct
Constants ¶
This section is empty.
Variables ¶
var Store adapter
Store is the package state variable which contains database connections
Functions ¶
func DeviceDetailPipe ¶
func DeviceDetailPipe(w http.ResponseWriter, r *http.Request)
DeviceDetailPipe
func GetBrsrDetails ¶
func GetBrsrDetails(w http.ResponseWriter, r *http.Request)
GetBrsrDetails collects extension and browser details from trasa browser extension
func GiveMeDeviceDetail ¶
func GiveMeDeviceDetail(orgID, userID, deviceID, totpSec string)
GiveMeDeviceDetail calls trasa cloud server asking for users device details. It does by first calling cloud server by providing device ID and expects fcm token, public keys in return. once it receives device details, it calls redis to get user ID for that device id then stores users device detail in database.
func IsKnownExts ¶
IsKnownExts checks default extensions found in browsers
func PassMyDeviceDetail ¶
func PassMyDeviceDetail(w http.ResponseWriter, r *http.Request)
PassMyDeviceDetail receives device detial from mobile client and passes this data to deviceDetailPipe by storing values in redis.
Types ¶
type DeviceEnrollResp ¶ added in v1.1.4
type EnrolDeviceStruct ¶
type EnrolDeviceStruct struct { DeviceID string `json:"deviceID"` TotpSSC string `json:"totpSSC"` OrgName string `json:"orgName"` Account string `json:"account"` CloudProxyURL string `json:"cloudProxyURL"` }
func EnrolDeviceFunc ¶
func EnrolDeviceFunc(userDetail models.User) EnrolDeviceStruct
EnrolDeviceFunc should only be called after successful authentication and authorization.