简体   繁体   English

通用REST客户端在向资源服务器发出请求时如何使用O Auth访问令牌?

[英]How generic REST client can use O Auth access tokens while making requests to Resource Server?

We are implementing generic REST client where in we want to support O' Auth 2.0. 我们正在实现通用的REST客户端,以支持O'Auth 2.0。 For now we are thinking off to allow users to define Access Token (no matter from where they bought it) while configuring client, which REST client will use while making requests. 目前,我们正在考虑允许用户在配置客户端时定义访问令牌(无论从何处购买),以便在发出请求时使用哪个REST客户端。

is it possible ? 可能吗 ? I have couple of questions 我有几个问题

  1. Is the way a client get access token from authorization server a standard ? 客户端从授权服务器获取访问令牌的方式是否是标准的?
  2. Is client registered with the auth server while requesting access_token and can't same access token be used by other clients? 客户端在请求access_token时是否已在身份验证服务器上注册,其他客户端无法使用同一访问令牌吗?
  3. Is SSL or TSL mandate ? 是SSL还是TSL授权?
  4. Is the way client send access token to Resource server (while making resource req)a standard, does all Resource provider (facebook, linkedin, salesforce, google) support access_token sent in HTTP header or in Query parameter. 客户端将访问令牌发送到资源服务器的方式(在使资源需要时)是一种标准,所有资源提供者(facebook,linkedin,salesforce,google)是否支持在HTTP标头或查询参数中发送的access_token。
  5. Is sending access token to resource server standardized, ie we need not to encrypt or use any third party lib for this. 正在将访问令牌发送到标准化的资源服务器,即,我们不需要为此加密或使用任何第三方库。

I would suggest you read the spec here . 我建议您在这里阅读规格。 Every Library implementation uses this standard, you can use whatever method to generate your keys and authorizations etc, but if you conform to those interfaces then you should be fine. 每个库实现都使用此标准,您可以使用任何方法来生成密钥和授权等,但是如果您遵循这些接口,则应该可以。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM