DotNetOpenAuth OAuth2Client在TokenEndpoint请求中添加自定义标头

时间:2015-03-04 17:45:03

标签: c# oauth-2.0 dotnetopenauth

我正在集成的oAuth2服务器需要一个由ProcessUserAuthentication

执行的访问令牌请求中的标题(“Accept:application / json”)
// In callback from initial RequestUserAuthorization
using DotNetOpenAuth.OAuth2;
var server = new AuthorizationServerDescription
            {
                AuthorizationEndpoint = new System.Uri("APPROVE-APP-ENDPOINT"),
                TokenEndpoint = new System.Uri("MY-TOKEN-ENDPOINT"),
                ProtocolVersion = ProtocolVersion.V20
            };
var client = new WebServerClient(server,CLIENT_ID, CLIENT_SECRET);
var authorization = client.ProcessUserAuthorization();   

那么如何将此标头添加到作为ProcessUserAuthorization(授权令牌交换为访问/刷新令牌)的一部分调用的TokenEndpoint的请求中?

0 个答案:

没有答案