还有 Microsoft Authenticator dev API 吗?我该如何使用它?
Is there still a Microsoft Authenticator dev API? How can I use It?
我不知道我是否应该在这里问这个问题,如果我使用的标签完全正确,但是...我需要向我正在开发的系统添加一个 2FA,同时,我一直在寻找 2FA 的最佳可用选项,我们考虑为其添加 Microsoft Authenticator 支持(我们喜欢 Authy、Google Authenticator 等,但我们在这里更喜欢 Microsoft 解决方案)。似乎曾经有一种方法可以将 Microsoft 的 2FA 添加到我们的站点,但是现在 2019 年有没有办法做到这一点?如果是这样,它是免费的吗(我们有微软开发者帐户......如果拥有它们是唯一的付费要求,我们没问题)
Microsoft 和 Google 身份验证器只是实现了 TOTP 机制以提供无服务器(阅读:离线,您只需要一个准确的时间戳)一次性密码机制。您可以使用任何通用 TOTP 库生成用户特定的共享机密,可能将该共享机密编码为 QR 图像以便于配置,然后验证提供的令牌是否与共享机密匹配并且是否在最后 +-n 秒内创建。
您可以从这里开始:https://github.com/BrandonPotter/GoogleAuthenticator
尽管该库名为“Google Authenticator”,但它也可以与 Microsoft 的 Authenticator 一起使用,因为它们的功能基本相同。 TOTP
Microsoft Authenticator 只是实现了基于时间的 OTP 机制 (https://en.wikipedia.org/wiki/Time-based_One-Time_Password)。
如果您没有 Azure 帐户,Microsoft 身份验证器可以扫描嵌入以下内容的二维码 URL
otpauth://totp/UserName?secret=Some-long-secret&digits=6&issuer=CompanyName
Microsoft Authenticator 扫描此 QR 码后,它将开始向您显示一次性密码。
在服务器端,您可以使用 https://github.com/samdjstevens/java-totp 这样的库
该库可用于生成机密或验证 Microsoft Authenticator 生成的 OTP。
是的,很快go-through:
您的用户下载 Microsoft Authenticator 应用 https://apps.apple.com/us/app/microsoft-authenticator/id983156458 or https://play.google.com/store/apps/details?id=com.azure.authenticator&hl=en&gl=US
您代表您的用户生成一个“秘密”代码:
https://microsoft-authenticator.p.rapidapi.com/new/
服务器将 return 您的密码(例如“IH225HMVWDS3XJVY”),保留密码,因为您将在第 3 步和第 4 步需要它。
您通过以下方式为您的用户生成二维码:
https://microsoft-authenticator.p.rapidapi.com/enroll/?secret=IH225HMVWDS3XJVY&account=A123&issuer=HomeCorp
用户使用 Microsoft Authenticator 应用程序扫描二维码,现在会生成临时代码。
现在您可以通过以下方式验证代码:
https://microsoft-authenticator.p.rapidapi.com/validate/?secret=IH225HMVWDS3XJVY&code=425079
希望对您有所帮助。
我不知道我是否应该在这里问这个问题,如果我使用的标签完全正确,但是...我需要向我正在开发的系统添加一个 2FA,同时,我一直在寻找 2FA 的最佳可用选项,我们考虑为其添加 Microsoft Authenticator 支持(我们喜欢 Authy、Google Authenticator 等,但我们在这里更喜欢 Microsoft 解决方案)。似乎曾经有一种方法可以将 Microsoft 的 2FA 添加到我们的站点,但是现在 2019 年有没有办法做到这一点?如果是这样,它是免费的吗(我们有微软开发者帐户......如果拥有它们是唯一的付费要求,我们没问题)
Microsoft 和 Google 身份验证器只是实现了 TOTP 机制以提供无服务器(阅读:离线,您只需要一个准确的时间戳)一次性密码机制。您可以使用任何通用 TOTP 库生成用户特定的共享机密,可能将该共享机密编码为 QR 图像以便于配置,然后验证提供的令牌是否与共享机密匹配并且是否在最后 +-n 秒内创建。
您可以从这里开始:https://github.com/BrandonPotter/GoogleAuthenticator 尽管该库名为“Google Authenticator”,但它也可以与 Microsoft 的 Authenticator 一起使用,因为它们的功能基本相同。 TOTP
Microsoft Authenticator 只是实现了基于时间的 OTP 机制 (https://en.wikipedia.org/wiki/Time-based_One-Time_Password)。
如果您没有 Azure 帐户,Microsoft 身份验证器可以扫描嵌入以下内容的二维码 URL
otpauth://totp/UserName?secret=Some-long-secret&digits=6&issuer=CompanyName
Microsoft Authenticator 扫描此 QR 码后,它将开始向您显示一次性密码。 在服务器端,您可以使用 https://github.com/samdjstevens/java-totp 这样的库 该库可用于生成机密或验证 Microsoft Authenticator 生成的 OTP。
是的,很快go-through:
您的用户下载 Microsoft Authenticator 应用 https://apps.apple.com/us/app/microsoft-authenticator/id983156458 or https://play.google.com/store/apps/details?id=com.azure.authenticator&hl=en&gl=US
您代表您的用户生成一个“秘密”代码:
https://microsoft-authenticator.p.rapidapi.com/new/
服务器将 return 您的密码(例如“IH225HMVWDS3XJVY”),保留密码,因为您将在第 3 步和第 4 步需要它。
您通过以下方式为您的用户生成二维码:
https://microsoft-authenticator.p.rapidapi.com/enroll/?secret=IH225HMVWDS3XJVY&account=A123&issuer=HomeCorp
用户使用 Microsoft Authenticator 应用程序扫描二维码,现在会生成临时代码。
现在您可以通过以下方式验证代码:
https://microsoft-authenticator.p.rapidapi.com/validate/?secret=IH225HMVWDS3XJVY&code=425079
希望对您有所帮助。