指南
Intune 教程
使用 @capgo/capacitor-intune
Capacitor Microsoft Intune MAM 注册, 应用保护策略, 应用配置, 和 MSAL 身份验证插件。
安装
bun add @capgo/capacitor-intune
bunx cap sync
此插件暴露的内容
acquireToken- 使用 Microsoft 登录流程并返回访问令牌和帐户元数据。acquireTokenSilent- 从 MSAL 缓存中获取之前登录的用户的令牌。registerAndEnrollAccount- 将之前已验证的帐户注册到 Intune 并开始注册。loginAndEnrollAccount- 在未先请求应用程序令牌的情况下,要求 Intune 验证并注册用户。
示例使用
acquireToken
使用 Microsoft 登录流程并返回访问令牌和帐户元数据。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireToken({} as AcquireTokenOptions);
acquireTokenSilent
从 MSAL 缓存中获取之前登录的用户的令牌。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireTokenSilent({} as AcquireTokenSilentOptions);
registerAndEnrollAccount
将之前已验证的帐户注册到 Intune 并开始注册。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.registerAndEnrollAccount({} as RegisterAndEnrollAccountOptions);
loginAndEnrollAccount
在未先请求应用程序令牌的情况下,要求 Intune 验证并注册用户。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.loginAndEnrollAccount();
完整参考
- GitHub: https://github.com/Cap-go/capacitor-intune/
- 文档:/docs/plugins/intune/
继续使用@capgo/capacitor-intune
如果您正在使用 使用@capgo/capacitor-intune 来规划身份验证和帐户流程,连接它与 @capgo/capacitor-intune 的实现细节在@capgo/capacitor-intune, 入门 实现细节在入门, @capgo/capacitor-social-login 实现细节在@capgo/capacitor-social-login, @capgo/capacitor-passkey 了解capgo/capacitor-passkey的实现细节 @capgo/capacitor-native-biometric 了解capgo/capacitor-native-biometric的实现细节