首页 \ 问答 \ Linkedin在服务器端验证Oauth2访问令牌(Linkedin Verify Oauth2 access token on server side)

Linkedin在服务器端验证Oauth2访问令牌(Linkedin Verify Oauth2 access token on server side)

首先我试着在LinkedIn上查看解决方案验证用户身份验证令牌服务器端,但我发现它非常混乱,并且不清楚为什么客户端使用OAuth2并且服务器使用OAuth1.0a ...

我正在尝试创建以下LinkedIn身份验证模式,该模式遵循Facebook或Google+等其他社交网站:

  1. 客户端(Android或iOS)登录
  2. 将访问令牌发送到服务器
  3. 服务器验证访问令牌是为我的应用程序
  4. 服务器抓取一些配置文件信息...完成用户创建
    • 从服务器的长期访问不是必需的。 *

对于#1似乎LinkedIn文档说你不能通过其他API使用iOS访问令牌密钥(例如)? 什么是最好的方法来做到这一点? 我不确定这是否仍然如此,但让我们说这是,我们使用本地客户端的“传统REST身份验证”。

对于#3,我找不到任何对提供此类信息的REST调用的引用。 Facebook有/ debug_token和谷歌有/ tokeninfo来帮助这些努力。 对LinkedIn有没有类似的要求? 在上面链接的stackoverflow问题中,它讨论了发送安全cookie的问题。 但在我的原因,我既没有使用浏览器也没有可以接受cookie的服务器。

如果这不是LinkedIn的正确设计模式,请提出一个更好的适用于此流程的模式。

谢谢,

任何帮助,将不胜感激。


First off I tried looking at the solution in LinkedIn verify user auth token server side but I found it very confusing and unclear why the client uses OAuth2 and the server uses OAuth1.0a...

I'm trying to create the following LinkedIn authentication pattern which follows other networking sites like Facebook or Google+:

  1. Client (Android or iOS) logs in
  2. Sends access token to server
  3. Server verifies the access token is for my app
  4. Server grabs a bit of profile info ... finishes user creation
    • Long term access from the server is NOT required. *

For #1 is seems the LinkedIn docs say you cannot use an iOS access token key (for example) through the rest API? What's the best way to do this? I'm not sure if that is still true but lets say it is and we use "traditional REST auth" from the native client.

For #3 I cannot find any reference to a REST call that provides such info. Facebook has /debug_token and Google has /tokeninfo to aid these efforts. Is there a similar call for LinkedIn? In the stackoverflow issue I linked above it talked about sending secure cookies. But in my cause I'm neither using a browser nor a server that can accept cookies.

If this is not the right design pattern for LinkedIn please suggest a better one that works with this flow.

Thanks,

Any help would be appreciated.


原文:https://stackoverflow.com/questions/31751441
更新时间:2022-02-13 22:02

最满意答案

一种可能性是简单地从桌面上的普通存储库中取出,而不是直接推送到那里的签出分支,推送到仅用于接收笔记本电脑上的更新的其他分支,然后单独合并它们。

那是:

laptop$ git clone desktop:path/to/project
laptop$ cd project
[... make changes...]
laptop$ git push -f desktop:path/to/project master:from-laptop

desktop$ cd path/to/project
desktop$ git merge from-laptop

您可以在笔记本电脑存储库中配置branch.master.push master:from-laptop ,以便默认情况下git push将根据该规范进行推送。


One possibility is to simply pull from your normal repository on your desktop, but rather than pushing directly to the checked-out branch there, push to some other branch that is only for receiving updates on your laptop, and then merge them separately.

That is:

laptop$ git clone desktop:path/to/project
laptop$ cd project
[... make changes...]
laptop$ git push -f desktop:path/to/project master:from-laptop

desktop$ cd path/to/project
desktop$ git merge from-laptop

You can configure branch.master.push master:from-laptop in your laptop repository so that git push will push according to that spec by default.

相关问答

更多

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。