gotdv2

package module
v0.0.0-...-b3751d6 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 8 Imported by: 0

README

codecov

go-trusted-device-v2

Instalation

go get github.com/fazpass-sdk/go-trusted-device-v2

Usage

td, err := gotdv2.Initialize("./sample/private.key")
	if err != nil {
		log.Println(err)
	}
	meta, err = td.Extract("YOUR_META")
	if err != nil {
		log.Println(err)
	}
	log.Println(meta.FazzpassId)

What Inside ?

type Meta struct {
	FazpassId       string            
	IsActive        bool              
	Scoring         float64           
	RiskLevel       string            
	TimeStamp       string            
	Platform        string            
	IsRooted        bool              
	IsEmulator      bool              
	IsGpsSpoof      bool              
	IsAppTempering  bool              
	IsVpn           bool              
	IsCloneApp      bool              
	IsScreenSharing bool              
	IsDebug         bool              
	Application     string            
	Device          Device            
	SimSerial       []string          
	SimOperator     []string          
	Geolocation     map[string]string 
	ClientIp        string            
	LinkedDevices   []Device          
}

type Device struct {
	Name      string 
	OSVersion string 
	Series    string 
	CPU       string 
	ID        string 
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Biometric

type Biometric struct {
	Level      string `json:"level"`
	IsChanging bool   `json:"is_changing"`
}

type Device

type Device struct {
	Name      string `json:"name"`
	OSVersion string `json:"os_version"`
	Series    string `json:"series"`
	CPU       string `json:"cpu"`
	ID        string `json:"id"`
}

type Fazpass

type Fazpass struct {
	PrivateKey *rsa.PrivateKey
}

func Initialize

func Initialize(privateKeyPath string) (Fazpass, error)

func (*Fazpass) Extract

func (f *Fazpass) Extract(meta string) (Meta, error)

type Meta

type Meta struct {
	Challenge       string            `json:"challenge"`
	FazpassId       string            `json:"fazpass_id"`
	IsActive        bool              `json:"is_active"`
	Scoring         float64           `json:"scoring"`
	RiskLevel       string            `json:"risk_level"`
	TimeStamp       string            `json:"time_stamp"`
	Platform        string            `json:"platform"`
	IsRooted        bool              `json:"is_rooted"`
	IsEmulator      bool              `json:"is_emulator"`
	IsGpsSpoof      bool              `json:"is_gps_spoof"`
	IsAppTempering  bool              `json:"is_app_tempering"`
	IsVpn           bool              `json:"is_vpn"`
	Biometric       Biometric         `json:"biometric"`
	IsCloneApp      bool              `json:"is_clone_app"`
	IsScreenSharing bool              `json:"is_screen_sharing"`
	IsDebug         bool              `json:"is_debug"`
	Application     string            `json:"application"`
	Device          Device            `json:"device_id"`
	SimSerial       []string          `json:"sim_serial"`
	SimOperator     []string          `json:"sim_operator"`
	Geolocation     map[string]string `json:"geolocation"`
	ClientIp        string            `json:"client_ip"`
	LinkedDevices   []Device          `json:"notifiable_devices"`
	IsNotifiable    bool              `json:"is_notifiable"`
}

type TrustedDevice

type TrustedDevice interface {
	Extract(meta string) (Meta, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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