devices

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: 14 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 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 InitStore

func InitStore(state *global.State)

InitStore initialises package state

func IsKnownExts

func IsKnownExts(extID string) bool

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 DeviceEnrollResp struct {
	DeviceID     string `json:"deviceID"`
	FCMToken     string `json:"fcmToken"`
	PublicKey    string `json:"publicKey"`
	DeviceFinger string `json:"deviceFinger"`
}

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.

Jump to

Keyboard shortcuts

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