Monday, March 30, 2015

Testing Authorization Header Bearer Tokens with OAuth2 and ASP.NET Web API

If you are testing your OAuth2 ASP.NET Web API Host, you are probably going to use a tool that allows you to test your ASP.NET Web API endpoints such as Telerik Fiddler.

Unfortunately, if you are not using a tool that automatically provides the correct header information values for you, you are left to look up those appropriate values yourself since Fiddler does not provide any default header information.

If you want to generate your Bearer Token, you can set up Fiddler to pass the following parameters in the Request Body like so:





Once you have obtained the Bearer Token, in the Composer Headers section, you type in the following:


Authorization: Bearer <bearer token>

Therefore, your Fiddler Composer screen will look something like this:





That is all there is to it!!

No comments:

Post a Comment