文档指定此代码以激活因子:...ctx, client, err := okta.NewClient(context, okta.WithOrgUrl("https://{yourOktaDomain}"), okta.WithToken("{apiToken}"))factor, resp, err := client.Factor.ActivateFactor(user.Id, factor.Id, nil)...但在实践中,我需要一些改变:...ctx, client, err := okta.NewClient(context, okta.WithOrgUrl("https://{yourOktaDomain}"), okta.WithToken("{apiToken}"))activationRequest := *okta.NewActivateFactorRequest()//What information should the activationRequest be completed with? //Is it completely necessary?factor, resp, err := client.UserFactor.ActivateFactor(ctx, userID, factorID, activationRequest, nil)...其类型为:activationRequesttype ActivateFactorRequest struct { Attestation string `json:"attestation,omitempty"` ClientData string `json:"clientData,omitempty"` PassCode string `json:"passCode,omitempty"` RegistrationData string `json:"registrationData,omitempty"` StateToken string `json:"stateToken,omitempty"`}这里的主要问题是:激活请求激活请求应使用哪些信息来完成?由于Okta SDK for Go的文档似乎并不完全完整,我不知道在哪里可以找到有关激活该因子的过程的更多参考。任何帮助将不胜感激,谢谢!
1 回答
幕布斯6054654
TA贡献1876条经验 获得超7个赞
我想通了。在本部分中
...
ctx, client, err := okta.NewClient(context, okta.WithOrgUrl("https://{yourOktaDomain}"), okta.WithToken("{apiToken}"))
activationRequest := *okta.NewActivateFactorRequest()
activationRequest.PassCode = passCode // The access code sent to your email
factor, resp, err := client.UserFactor.ActivateFactor(ctx, userID, factorID, activationRequest, nil)
...
激活中不需要更多信息请求激活电子邮件因素
- 1 回答
- 0 关注
- 70 浏览
添加回答
举报
0/150
提交
取消