Linkedin在服务器端验证Oauth2访问令牌(Linkedin Verify Oauth2 access token on server side)
首先我试着在LinkedIn上查看解决方案验证用户身份验证令牌服务器端,但我发现它非常混乱,并且不清楚为什么客户端使用OAuth2并且服务器使用OAuth1.0a ...
我正在尝试创建以下LinkedIn身份验证模式,该模式遵循Facebook或Google+等其他社交网站:
- 客户端(Android或iOS)登录
- 将访问令牌发送到服务器
- 服务器验证访问令牌是为我的应用程序
- 服务器抓取一些配置文件信息...完成用户创建
- 从服务器的长期访问不是必需的。 *
对于#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+:
- Client (Android or iOS) logs in
- Sends access token to server
- Server verifies the access token is for my app
- 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
最满意答案
一种可能性是简单地从桌面上的普通存储库中取出,而不是直接推送到那里的签出分支,推送到仅用于接收笔记本电脑上的更新的其他分支,然后单独合并它们。
那是:
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 thatgit push
will push according to that spec by default.
相关问答
更多-
电脑二级考试 是考access 还是VPF[2022-06-08]
access -
一种可能性是简单地从桌面上的普通存储库中取出,而不是直接推送到那里的签出分支,推送到仅用于接收笔记本电脑上的更新的其他分支,然后单独合并它们。 那是: 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 deskt ...
-
由于您的笔记本主分支中有不在服务器的主分支中的提交,因此每次服务器发生更改时,便携式计算机都无法更新主分支指针。 这就是为什么你要创建合并提交。 如果您想要继续进行未存储在服务器上但只存储在笔记本电脑上的更改,则需要进行git fetch ,然后git rebase origin/master 。 提取将从服务器下载提交,但不会更改您的本地分支,并且重新分配将在服务器的主分支(原始/主)之上重新创建笔记本电脑的主分支更改。 尽管没有那些提交,但可能会更好。 难道他们不能被整合到整个代码库中只有一个共同的历史 ...
-
您可以看到的几件事情: 你的gitolite-admin.git repo中的gitolite.conf。 确保内容是这样的。 repo gitolite-admin RW+ = rui repo testing RW+ = @all 在gitolite-admin.git repo的gitolite-admin / keydir目录中检查您的公钥文件是否存在。 它还匹配您用于连接的文件的私钥。 我自己设置了gitolite,它对我很有 ...
-
实际上,当我试图克隆它也提供了警告框中的错误 The server's host key is not cached in the registry 选择是或否选择是然后它给了我错误 unable to open connection. Host does not exist 所以解决方案是将主机密钥保存在注册表中 打开cmd并转到plink的路径(我的是C:\ Program Files(x86)\ GitExtensions \ PuTTY)并键入plink user@whateveryours ...
-
从本地路径以可编辑模式安装它: pip install -e /develop/MyPackage 这实际上是将你的virtualenv中的软件包符号链接起来,因此你可以继续进行devving和testing。 Install it in editable mode from your local path: pip install -e /develop/MyPackage This actually symlinks the package within your virtualenv so you ...
-
您需要在Windows框中将SSH设置为服务器,以便它可以侦听SSH客户端请求。 以下是Windows服务器上SSH服务器上的Stack Overflow线程的链接 。 You will need to set up SSH as a server on the Windows box so it can listen for SSH client requests. Here is a link to a Stack Overflow thread on SSH servers for Windows.
-
我使用的两个选项: 在你的bitbucket帐户上创建一个私有存储库并使用它。 使用闪光棒或外置硬盘。 您还可以共享目录或使用hg serve在两台计算机位于同一网络时直接链接。 我做了上面两个,因为一台机器在家里而另一台在工作。 Two options I use: Make a private repository on your bitbucket account and use that, too. Use a flash stick or external hard drive. You coul ...
-
git clone http://abc.com/dev/project/ $HOME/myworkdir cd $HOME/myworkdir // edit some stuff git add . git commit -m 'edited some stuff :)' git push origin 这应该是最简单的工作流程 更新您的评论: 这意味着遥控器要么是一个全新的(空的)存储库(没有造成伤害),要么它没有提名当前的分支。 第一件事是通过推动一个新分支来解决的 cd ~/myworkd ...