外接程序应用程序的单一授权。 [英] Single authorization of the Add-in application.
问题描述
下午好。
使用加载项( SharePoint内部部署/在线提供商托管的跨域库。首次联系Rest Api SharePoint时,您已获得授权。还有一个自定义授权。因此,有2个授权。
如何检查SharePoint上下文中是否存在令牌并授权用户立即,第一次登录应用程序。并获取有关用户(登录)的信息,只留下一个SharePoint授权。
关于SharePoint单点登录,希望以下文章对您有所帮助。
https://www.brightwork.com/blog/single-sign-sharepoint-one-username-one-密码 - 零 - 头痛#.WrrLYKiWaM8
关于检查令牌的存在,我们可以检查是否存在相关的cookie("rtFa"和"FedAuth")。
我们可以使用JS获取cookie值。
function getCookie(name)
{
var arr,reg = new RegExp("(^ |)" + name +" =([^;] *)(; |
)");
if(arr = document.cookie.match(reg)){
return unescape(arr [2]);
} else {
返回null;
}
}
祝你好运,
Lee Liu
Good afternoon.
Use the Add-in (SharePoint on-premises/Online Provider-hosted) Cross-Domain Library. When you first contact Rest Api SharePoint, you are authorized. There is also a custom authorization. As a result, there are 2 authorizations.
How to check the presence of a token in the context of SharePoint and authorize the user immediately, the first time you log in to the application. And also get information about the user (login) to leave only one SharePoint authorization.
Hi,
About SharePoint single-sign-on, hope the below article would be helpful to you.
About check the presence of token, we can check if the related cookies("rtFa" and "FedAuth") exist.
We can use JS to get cookie value.
function getCookie(name) { var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|
)"); if(arr=document.cookie.match(reg)){ return unescape(arr[2]); }else{ return null; } }Best regards,
Lee Liu
这篇关于外接程序应用程序的单一授权。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!