多个WinRT应用程序的通用登录 [英] Common Login for multiple WinRT apps

查看:339
本文介绍了多个WinRT应用程序的通用登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个WinRT应用程序请求会话的相同登录服务。

I have two WinRT apps which request same Login service for a session. There is a global HttpClient(along with a cookiecontainer) in each of the apps which saves the cookie for further requests.

目前,如果用户登录应用程序A并打开应用程序,则会显示一个全局HttpClient(以及cookiecontainer) B,用户必须重新登录(即使会话没有超时)。

Currently if a user logs into app A and opens App B, the user has to login again(Even if the session has not timed out).

我不希望用户再次登录,如果他已经登录了一个应用程序。我该如何实现呢?
如何在应用程序之间共享此HttpClient对象?

I do not want the user to login again if he has logged into one app. How can I achieve this? How can I share this HttpClient object across apps?

编辑:
会话由Cookie维护。如何在客户端保存Cookie(以及超时值),以便其他应用程序可以访问?

Sessions are being maintained by Cookies. How can I save the cookies(along with timeout value) on the client side in such a way that it can be accessed by the other apps?

推荐答案

这将很难在多个应用程式之间共用Cookie /凭证。有一件事你可以做的是探索使用CredentialLocker这些信息。在Windows 8.1中,如果使用标准身份验证代理,则可以为提供程序(用户选择加入)保存凭据信息,以便AppB第二次登录(不是自动登录,而是预填充凭据)

This will be difficult to share cookie/creds across multiple apps. One thing you can do is explore using the CredentialLocker for some of this information. In Windows 8.1, if you are using the standard authentication brokers, the credential information can be saved for the provider (user opt-in) to make it easier for AppB to login the second time (not automatically, but would pre-fill creds)

这篇关于多个WinRT应用程序的通用登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆