`

OAUTH 1.0

    博客分类:
  • web
 
阅读更多

OAUTH 1.0

Terminology

Client, Server, and Resource Owner

OAuth defines three roles: client, server, and resource owner (nicknamed the OAuth Love Triangle by Leah Culver). These three roles are present in any OAuth transaction; in some cases the client is also the resource owner. The original version of the specification used a different set of terms for these roles: consumer (client), service provider (server), and user (resource owner).

In the traditional client-server authentication model, the client uses its credentials to access its resources hosted on the server. As far as the server is concerned, the shared secret used by the client belongs to the client. The server doesn’t really care where it came from or if the client is acting on behalf of some other entity. As long as the shared secret matches the server’s expectation, the request is processed.

There are many times when the client is acting on behalf of another entity. That entity can be another machine or person. When such a third actor is involved, typically a user interacting with the client, the client is acting on the user’s behalf. In these cases, the client is not accessing its own resource but those of the user – the resource owner.

Instead of using the client’s credentials, the client is using the resource owner’s credentials to make requests – pretending to be the resource owner. User credentials typically include a username or screen-name and a password, but resource owners are not limited to users, they can be any entity controlling the server resources.

The model gets a bit more detailed when the client is a web-based application. In that case, the client is split between a front-end component, usually running within a web browser on the resource owner’s desktop, and a back-end component, running on the client’s server.

The resource owner is interacting with one part of the client application while the server is receiving requests from another part. However, no matter what internal architecture the client uses, it is still acting as a single entity and on behalf of the resource owner.

Protected Resources

A protected resource is a resource stored on (or provided by) the server which requires authentication in order to access it. Protected resources are owned or controlled by the resource owner. Anyone requesting access to a protected resource must be authorized to do so by the resource owner (enforced by the server).

A protected resource can be data (photos, documents, contacts), services (posting blog item, transferring funds), or any resource requiring access restrictions. While OAuth can be used with other transport protocols, it is only defined for HTTP(S) resources.

2-Legged, 3-Legged, n-Legged

The number of legs used to describe an OAuth request typically refers to the number of parties involved. In the simple OAuth flow: a client, a server, and a resource owner, the flow is described as 3-legged. When the client is also the resource owner (that is, acting on behalf of itself), it is described as 2-legged. Additional legs usually mean different things to different people, but in general mean that access is shared by the client with other clients (re-delegation).

Credentials and Tokens

OAuth uses three kinds of credentials: client credentials, temporary credentials, and token credentials. The original version of the specification used a different set of terms for these credentials: consumer key and secret (client credentials), request token and secret (temporary credentials), and access token and secret (token credentials). The specification still uses a parameter name ‘oauth_consumer_key‘ for backwards compatibility.

The client credentials are used to authenticate the client. This allows the server to collect information about the clients using its services, offer some clients special treatment such as throttling-free access, or provide the resource owner with more information about the clients seeking to access its protected resources. In some cases, the client credentials cannot be trusted and can only be used for informational purposes only, such as in desktop application clients.

Token credentials are used in place of the resource owner’s username and password. Instead of having the resource owner share its credentials with the client, it authorizes the server to issue a special class of credentials to the client which represent the access grant given to the client by the resource owner. The client uses the token credentials to access the protected resource without having to know the resource owner’s password.

Token credentials include a token identifier, usually (but not always) a random string of letters and numbers that is unique, hard to guess, and paired with a secret to protect the token from being used by unauthorized parties. Token credentials are usually limited in scope and duration, and can be revoked at any time by the resource owner without affecting other token credentials issued to other clients.

The OAuth authorization process also uses a set of temporary credentials which are used to identify the authorization request. In order to accommodate different kind of clients (web-based, desktop, mobile, etc.), the temporary credentials offer additional flexibility and security.

In OAuth 1.0, the secret half of each set of credentials is defined as a symmetric shared secret. This means that both the client and server must have access to the same secret string. However, OAuth supports an RSA-based authentication method which uses an asymmetric client secret. The different credentials are explained in more detailed later on.

分享到:
评论

相关推荐

    jmeter 实现oauth1.0授权认证

    在本文中,我们将深入探讨如何使用Apache JMeter进行OAuth 1.0授权认证。OAuth 1.0是一种授权协议,允许第三方应用安全地访问用户在另一服务上的资源,而无需获得用户的用户名和密码。JMeter是一款强大的性能测试...

    OAUTH1.0腾讯登录与新浪微博登录

    在这个主题中,我们将深入理解OAuth 1.0在腾讯和新浪微博登录中的应用,以及如何使用Java进行实现。 OAuth 1.0的核心概念包括三个主要角色:资源所有者(用户)、客户端(第三方应用)和认证服务器(腾讯或新浪微博...

    OAuth1.0中文文档

    OAuth 1.0 是一种开放标准的授权协议,主要用于允许第三方应用在用户授权的前提下安全地访问服务提供商(如社交网络)的数据。OAuth 1.0 由 Blaine Cook、Chris Messina、Larry Halff 和 David Recordon 等人发起,...

    ASP源码—QQ登录(基于oauth1.0版本).zip

    ASP源码—QQ登录(基于oauth1.0版本)是一个使用Active Server Pages (ASP)技术实现的QQ第三方登录系统,该系统允许用户通过他们的QQ账号进行授权登录,从而简化网站注册和登录流程。OAuth 1.0是授权框架的一个早期...

    基于ASP的QQ登录(基于oauth1.0版本).zip

    在本项目中,“基于ASP的QQ登录(基于oauth1.0版本).zip”是一个使用ASP(Active Server Pages)技术实现的QQ登录功能,它依赖于OAuth 1.0协议进行授权。OAuth是一种开放标准,允许用户提供一个令牌,而不是用户名和...

    Oauth1.0微博客户端

    基于Android系统的移动微博集成交互平台的设计与实现,用户通过手机或者PC来向微博开放平台服务器发送请求,微博服务器接收请求,并且返回XML格式或者JSON格式的数据给客户端。也就是说发送和接收都是基于字符流的,...

    OAuth协议1.0版本中文版

    OAuth1.0版本是这个协议的早期版本,它为互联网应用提供了一个安全、可扩展的框架,使得第三方开发者可以安全地进行数据交互。 OAuth1.0的核心概念包括以下几个方面: 1. **资源所有者(Resource Owner)**:即...

    node-oauth-lite:适用于Node.js的OAuth 1.0a客户端库

    介绍node-oauth-lite是用于Node.js的轻量级OAuth 1.0a客户端库。 它设计用于任何HTTP客户端库,并支持Google的[XOAUTH机制]( ),用于SMTP和IMAP身份验证。用法示例获取请求令牌 oauth = require ( " oauth-lite " ...

    ASP实例开发源码-QQ登录ASP版(基于oauth1.0版本).zip

    ASP实例开发源码—QQ登录ASP版(基于oauth1.0版本).zip ASP实例开发源码—QQ登录ASP版(基于oauth1.0版本).zip ASP实例开发源码—QQ登录ASP版(基于oauth1.0版本).zip

    oauth-subscriber, 使用 OAuth 1.0 ( Guzzle 6 ) 标记Guzzle请求.zip

    oauth-subscriber, 使用 OAuth 1.0 ( Guzzle 6 ) 标记Guzzle请求 Guzzle OAuth订阅服务器使用 OAuth 1.0标记HTTP请求。 使用使用者密钥。消费者机密。OAuth令牌和OAuth密钥对请求进行签名。这里版本仅适用于 Guzzle ...

    oauth1, Go的OAuth 1.0客户机包.zip

    oauth1, Go的OAuth 1.0客户机包 OAuth1 OAuth1是 OAuth client client客户机 client OAuth和 RFC协议的客户机。 软件包支持 HMAC-SHA1,RSA-SHA1和纯文本签名。安装go get github

    oauth1::locked_with_key:用于PHP的OAuth 1.0客户端库

    您可以使用它与实现OAuth 1.0协议的任何提供程序进行交互,例如Twitter。 这是一个如何使用此程序包与Twitter API交互的快速示例:获取授权用户的推文。 <?php // Includes the Composer autoload file. ...

    simple-oauth1:使用OAuth 1.0a服务提供商进行身份验证的简单插入类

    简单的oauth1使用OAuth 1.0a服务提供商进行身份验证的简单代码为具有块和ARC的iOS 6构建。 AFNetworking( )提供了一些很棒的方法来处理url参数,该方法已在项目中使用。 还使用了OAuthConsumer( )的一种不错的...

    oauth1.0a:服务平台的oauth-1.0a实现

    服务开放API的OAuth-1.0a实现 安装 ### Node.js $ npm install serve-oauth --save ###浏览器即将推出... 用法 ###使用https(Node.js) 依赖 var oauth = require ( 'serve-oauth' ) ; var https = require ( '...

    QQ登录ASP版(基于oauth1.0版本)

    QQ登录ASP版本,采用oauth1.0版本,配置简单,只要修改config.asp即可 将本文件所在的文件夹放在网站任何目录均可 ========================= 1.配置文件config.asp '参数配置 '申请到的appid const appid = "123456...

    muralla:基于OAuth 1.0a规范的OAuth框架

    墙通过REST通信为WEB应用程序中的OAuth 1.0a标准( )的实现预先配置的框架要求JDK 1.7(或更高版本) MAVEN 3.x 兼容JEE6的应用服务器赞助身份提供者( 'IDP' )的登录应用程序,提供令牌的应用程序( 'SP' )和...

    tmhOAuth:用PHP编写的OAuth 1.0A库

    支持OAuth 1.0A 使用授权标头代替查询字符串或POST参数 允许上传图片 提供足够的信息以帮助调试 依存关系 该库已经过PHP 5.3+的测试,并依赖CURL和hash_hmac。 绝大多数托管服务提供商都包括这些库,并在PHP 5.1+上...

    backbone-oauth-1.0a:适用于Backbone.js的OAuth 1.0a插件

    骨干-oauth-1.0a 适用于Backbone.js的OAuth 1.0a插件 该库旨在实现纯JavaScript oauth 1.0a。 在使用此方法之前,您应该了解与消费者令牌/秘密存储有关的某些安全问题。 这是一篇很好的文章,介绍了一种可能的解决...

    HWIOAuthBundle:Symfony的OAuth客户端集成。 同时支持OAuth1.0a和OAuth2

    HWIOAuthBundle添加了对通过Symfony中的OAuth1.0a或OAuth2对用户进行身份验证的支持。 注意:此捆绑包为实现任何OAuth1.0a或OAuth2提供程序提供了简便的方法! 安装 所有安装说明均位于文档中,请检查其特定版本:...

Global site tag (gtag.js) - Google Analytics