Documentation ¶
Index ¶
- func HandleTfaAndGetDeviceID(signResponse *u2f.SignResponse, ...) (deviceID string, reason consts.FailedReason, ok bool)
- func SendU2F(userID, orgID, appName, ip string) (bool, string)
- func SignReq(userID, orgID string) (*u2f.WebSignRequest, error)
- func SignResp(signResp *u2f.SignResponse, keyval, challengeJson string) error
- func U2fHandler(w http.ResponseWriter, r *http.Request)
- func VerifyTotpCode(totpCode, userID, orgID string) (bool, string, error)
- type U2f
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleTfaAndGetDeviceID ¶
func HandleTfaAndGetDeviceID(signResponse *u2f.SignResponse, tfaMethod, totpCode, userID, clientIP, appName, timezone, orgName, orgID string) (deviceID string, reason consts.FailedReason, ok bool)
HandleTfaAndGetDeviceID handles all 2fa process, update device hygiene from u2f and return device ID of 2fa device
func SignReq ¶
func SignReq(userID, orgID string) (*u2f.WebSignRequest, error)
SignReq is used by TfaHandler
Types ¶
type U2f ¶
type U2f struct { AppName string `json:"appSecret"` Answer string `json:"answer"` Challenge string `json:"challenge"` DeviceID string `json:"deviceId"` Signature string `json:"signature"` DeviceInfo string `json:"deviceInfo"` // contains filtered or unexported fields }
todo check if fields are correct
Click to show internal directories.
Click to hide internal directories.