会话令牌 [英] Session Token

查看:70
本文介绍了会话令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有没有办法使用sharepoint的REST API在javascript中访问sharepoint当前用户的会话令牌?目标是在加载sharepoint仪表板时验证postgreSQL数据库中的用户权限。


谢谢,


Pedro

解决方案

Hi Pedro,


作为解决方法,我们可以使用下面的REST API获取当前用户信息。

  http://<< site  url>> / _ api / web / currentuser 

然后使用LoginName或Email来验证postgreSQL数据库中的权限。


如果要从postgreSQL访问数据数据库,我们也可以使用Business Connectivity Services(BCS)来实现它。


https://docs.microsoft.com/en-us/sharepoint/dev/general-development/business-connectivity-services-in-sharepoint


或者我们可以为SharePoint创建自定义REST服务来实现它。


https://social.technet.microsoft.com/wiki/contents/articles/24194.sharepoint-2013-create-a-custom-wcf-rest-service-hosted-in-分享并部署在一个wsp.aspx


最好的问候,


Dennis


Hi,

Is there a way to access the sharepoint current user's session token in javascript using sharepoint's REST API? The goal is to validate the user permissions in a postgreSQL database while loading a sharepoint dashboard.

Thanks,

Pedro

解决方案

Hi Pedro,

As a workaround, we can get the current user info using the REST API below.

http://<<site url>>/_api/web/currentuser 

And then use LoginName or Email to validatae the permissions in postgreSQL database.

If you want to access data from postgreSQL database, we can also use Business Connectivity Services(BCS) to achieve it.

https://docs.microsoft.com/en-us/sharepoint/dev/general-development/business-connectivity-services-in-sharepoint

Or we can create a custom REST service for SharePoint to achieve it.

https://social.technet.microsoft.com/wiki/contents/articles/24194.sharepoint-2013-create-a-custom-wcf-rest-service-hosted-in-sharepoint-and-deployed-in-a-wsp.aspx

Best Regards,

Dennis


这篇关于会话令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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