信息
您所需的主题如下所示。但此主题未包含在此库中。

Windows.Security.Authentication.OnlineId Namespace

使 Windows Store 应用程序和桌面应用程序可以使用 Live 来通过用户的 Microsoft 帐户来对其进行身份验证。身份验证后,应用程序可返回 JSON 标记,其 ID 可用于应用程序的该用户。

除了身份验证,应用程序还能请求用户权限以访问用户的社交网络,甚至在应用程序内从 Microsoft OneDrive 检索照片。要使您的应用程序可以访问此信息,它必须首先获得登录用户的同意。用户提供许可后,应用程序接收其可以使用的访问令牌,然后使用 Live 服务 REST APIS 获取用户许可的数据。 了解有关使用活动联接 API 的更多信息

成员

Windows.Security.Authentication.OnlineId命名空间 具有以下类型的成员:

Windows.Security.Authentication.OnlineId命名空间 具有以下类。

描述
OnlineIdAuthenticator Provides an app with the ability to start the authentication request to get JavaScript Object Notation (JSON) tokens to use with your service or request tickets that can be used to get data that the user has consented to for your app using the Live ConnectAPI.
OnlineIdServiceTicket Contains the ticket that is obtained after the user authenticates to this app or has provided consent to access user data stored in Live.
OnlineIdServiceTicketRequest Provides the ability for an app to specify the service and policy that is used to authenticate a Live user to obtain identity properties and tickets.
SignOutUserOperation Allows users to sign out of your app.
UserAuthenticationOperation Asynchronously gets the user's identity and corresponding tickets and properties.
UserIdentity Contains the ID, tickets, and other information associated with a user

 

枚举

Windows.Security.Authentication.OnlineId命名空间 具有以下枚举。

枚举描述
CredentialPromptType Provides the ability to control when to show or hide the credential prompt user interface. This includes the user interface for the app to collect user consent to access data stored in Live. The user must see the user interface in order for the app to obtain any user data, if not app will see an error when they try to obtain user data.

 

备注

Desktop Experience 功能必须与 Windows Server 2012 一起安装才能在 Windows Store 应用程序中进行打印体验。

要求

最低受支持的客户端

Windows 8

最低受支持的服务器

Windows Server 2012

最低受支持的电话

Windows Phone 8

命名空间

Windows.Security.Authentication.OnlineId
Windows::Security::Authentication::OnlineId [C++]

元数据

Windows.winmd

 

 

显示: