使用Oauth的Flickr身份验证 [英] Flickr authentication with Oauth

查看:110
本文介绍了使用Oauth的Flickr身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的网站构建一个自定义照相馆,该照相馆使用Flickr作为后端.我觉得我需要使用新的Oauth系统向Flickr进行身份验证.

I am building a custom photo gallery for my site which uses Flickr as the backend. I feel like I need to authenticate with Flickr using the new Oauth system.

每次我都将Oauth与Flickr结合使用时,所有这些都显示了如何做到这一点,以在您的应用程序中为人们提供一种登录Flickr帐户的安全方式"

Everytime I look into using Oauth with Flickr it all shows how to do it to "provide in your applications a secure way for people to sign-in into their Flickr accounts"

我不需要其他人就能登录我的网站.我只需要一直登录到我的Flickr帐户即可.无论如何,链接到flickr的所有功能都在我自己的身份验证系统后面.

I don't need anyone else to be able to sign into my site. I just need it signed in to MY Flickr account all the time. All the functionality that links to flickr is behind my own authentication system anyway.

有人对我如何一直将其登录到我的帐户有任何想法吗,而这些都没有登录到用户帐户之类的东西.

Does anyone have any ideas how I can go about having it signed into MY account all the time and none of this sign into user accounts sort of stuff.

谢谢.

推荐答案

对于大多数涉及非公开照片的请求,您都需要OAuth访问令牌.因此,除非您要建立的画廊仅访问公共照片,否则您将需要OAuth访问令牌.

You need an OAuth access token for most request involving photos that are not public. So unless the gallery you're building only accesses public photos, you'll need an OAuth access token.

话虽如此,有很多第三方库(在 api页上的列表 )来处理每个请求的大部分OAuth身份验证和签名.获取访问令牌后,您可以将其持久保存在数据库中-它不会过期,但是可以被撤销.获得访问令牌后,就需要它对您向api发出的大部分请求进行签名.

Having said that, there are lots of 3rd party libraries (list on the api page) to handle most of the OAuth authentication and signing of each request. Once you've obtain an access token, you can persists locally in your database - it doesn't expire, but it can be revoked. Once you have the access token, you need it to sign most of the request you make to the api.

例如,即使要搜索自己的照片(如果是私人照片),也需要访问令牌和签名请求.

For example even to search your own photos - if they are private - requires an access token and a signed request.

这篇关于使用Oauth的Flickr身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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