跳过主要内容
返回插件
@capgo/capacitor-intune
教程
@capgo/capacitor-intune

Intune

Microsoft Intune MAM, app protection policy, app config, and MSAL authentication for Capacitor

指南

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();

- 全部参考

- 从使用 @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的实现细节