Documentation ¶
Overview ¶
百度人脸识别/人脸认证SDK
Index ¶
- func GetAccessToken() string
- func GetResultSimple(verify_token string) (string, error)
- func GetVerifyToken() string
- func Regedit(c *Config)
- func SwitchPlanId(plan_id string)
- type Config
- type IdCardSubmitStruct
- type ResultDetailResult
- type ResultDetailResultIdcardConfirm
- type ResultDetailResultIdcardImages
- type ResultDetailResultIdcardOcrResult
- type ResultDetailResultVerifyResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SwitchPlanId ¶
func SwitchPlanId(plan_id string)
切换plan_id
plan_id 方案的id信息,请在人脸实名认证控制台查看创建的H5方案的方案ID信息
Types ¶
type Config ¶
type Config struct { Domain string // 人脸识别接口域名 AppId string // 百度开发者平台的AppId AppKey string // 百度开发者平台的AK SecretKey string // 百度开发者平台的密钥信息 PlanId string // 获取鉴权ID }
百度人脸识别配置项
type IdCardSubmitStruct ¶
type IdCardSubmitStruct struct { SuccessUrl string `json:"success_url" form:"success_url"` // 成功的回跳地址 ErrorUrl string `json:"error_url" form:"error_url"` // 失败的回跳地址 H5Url string `json:"h5_url" form:"h5_url"` // 认证H5地址 VerifyToken string `json:"verify_token" form:"verify_token"` // 请求批次 }
func IdcardSubmit ¶
func IdcardSubmit(id_name, id_no string, c_type uint, suc_url, err_url string) (*IdCardSubmitStruct, error)
用户信息提交接口
id_name 姓名 id_no 身份证号 c_type 身份证类型 0-大陆居民二代身份证 4-港澳台居民居住证 suc_url 成功后的跳转地址,会自动追加&verify_token=xxxxx,所以若地址为绝对地址时请追加? err_url 成功后的跳转地址,会自动追加&verify_token=xxxxx,所以若地址为绝对地址时请追加?
type ResultDetailResult ¶
type ResultDetailResult struct { VerifyResult ResultDetailResultVerifyResult `json:"verify_result" form:"verify_result"` IdcardOcrResult ResultDetailResultIdcardOcrResult `json:"idcard_ocr_result" form:"idcard_ocr_result"` IdcardImages ResultDetailResultIdcardImages `json:"idcard_images" form:"idcard_images"` IdcardConfirm ResultDetailResultIdcardConfirm `json:"idcard_confirm" form:"idcard_confirm"` }
func GetResultDetail ¶
func GetResultDetail(verify_token string) (*ResultDetailResult, error)
获取认证结果
verify_token 识别token
type ResultDetailResultIdcardOcrResult ¶
type ResultDetailResultIdcardOcrResult struct { IssueAuthority string `json:"issue_authority" form:"issue_authority"` Address string `json:"address" form:"address"` Nation string `json:"nation" form:"nation"` ExpireTime string `json:"expire_time" form:"expire_time"` Name string `json:"name" form:"name"` IssueTime string `json:"issue_time" form:"issue_time"` IdCardNumber string `json:"id_card_number" form:"id_card_number"` Birthday string `json:"birthday" form:"birthday"` Gender string `json:"gender" form:"gender"` }
Click to show internal directories.
Click to hide internal directories.