通过授权标头的OAuth令牌请求 [英] Passing authorization header for oauth token request

查看:200
本文介绍了通过授权标头的OAuth令牌请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用java实现的OAuth获取未授权的请求令牌。我如何通过在授权头的参数?
我需要传递:

I using java to implement oauth for obtaining an unauthorized request token. How do I pass the parameters in the authorization header? I need to pass :

GET /request_token HTTP/1.1
Host: photos.example.net:80
Authorization: OAuth realm="http://photos.example.net/request_token",
    oauth_consumer_key="dpf43f3p2l4k3l03",
    oauth_nonce="kllo9940pd9333jh",
    oauth_timestamp="1191242096",
    oauth_signature_method="HMAC-SHA1",
    oauth_version="1.0",
    oauth_signature="tR3%2BTy81lMeYAr%2FFid0kMTYa%2FWM%3D"

我怎么去的?

推荐答案

对于那些寻找如何在头传递的OAuth2授权(访问令牌)(相对于使用请求或身体参数)为例,在这里如何把它完成:

For those looking for an example of how to pass the OAuth2 authorization (access token) in the header (as opposed to using a request or body parameter), here is how it's done:

Authorization: Bearer 0b79bab50daca910b000d4f1a2b675d604257e42

这篇关于通过授权标头的OAuth令牌请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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