简体   繁体   English

传递oauth令牌请求的授权标头

[英]Passing authorization header for oauth token request

I using java to implement oauth for obtaining an unauthorized request token. 我使用java实现oauth以获取未经授权的请求令牌。 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"

How do I go about that? 我该怎么做?

对于那些寻找如何在标头中传递OAuth2授权(访问令牌)的示例(与使用请求或body参数相反),以下是它的完成方式:

Authorization: Bearer 0b79bab50daca910b000d4f1a2b675d604257e42

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

相关问题 如何在Android OKHTTPClient请求上设置(OAuth令牌)授权标头 - How to set the (OAuth token) Authorization Header on an Android OKHTTPClient request 在SpringBoot上设置(OAuth令牌)授权Header - set the (OAuth token) Authorization Header on SpringBoot 如何在所有请求中传递授权令牌 header - Spring 启动 java - How to pass the authorization token in all request header - Spring boot java 从Scribe中的请求标头中删除oauth_token - Removing oauth_token from request header in Scribe 检测 Authorization Header 是 JWT 还是 OAUTH - Detect if Authorization Header is JWT or OAUTH 使用 API 请求上的附加 header 参数跳过 Oauth 2.0 授权 - Z38008DD81C2F4AFD71Z85 安全性 - Skipping Oauth 2.0 authorization using additional header param on API Request - Spring Security 春季启动OAuth2-OAuth令牌不返回授权令牌 - Spring boot OAuth2 - OAuth Token does not return authorization token 请求中不包含授权不记名令牌 - Authorization Bearer token is not included for request 如何使用 JWT 令牌在 Spring 中对安全端点的 GET 请求中包含授权标头 - How to include authorization header in GET request to secured endpoint in Spring with JWT token 使用授权标头在java中使用来自box.com的access_token向API V2发送请求 - Sending Request to API V2 using access_token from box.com in java with Authorization Header
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM