Hi Johann/Darshana,
I am trying to test a sample jaggery app with authorization code grant type
OAuth. I am testing this on IS 5.0.0 pack. I added a Service Provider and
enabled OAuth 2.0 authenticator for it.

Below is the first call I make to the IS -

*https://localhost:9443/oauth2/authorize?response_type=code&client_id=u8iH1rbGrygWsXPDIA_0wlpGt7Aa&redirect_uri=https://localhost:9444/coffee_shop/auth
<https://localhost:9443/oauth2/authorize?response_type=code&client_id=u8iH1rbGrygWsXPDIA_0wlpGt7Aa&redirect_uri=https://localhost:9444/coffee_shop/auth>*


I get a token to the https://localhost:9444/coffee_shop/auth.  I get a
query string of '*code=fec75d85ce706e8a276519fc63f7aa*'. I then send
another request to the token end point like below -

*https://localhost:9443/oauth2/token?grant_type=authorization_code&code=fec75d85ce706e8a276519fc63f7aa&redirect_uri=https://localhost:9444/coffee_shop/bam.jag&client_id=u8iH1rbGrygWsXPDIA_0wlpGt7Aa&client_secret=TGD7VTCPaE9cfNpM19fm9un2J3Ea
<https://localhost:9443/oauth2/token?grant_type=authorization_code&code=fec75d85ce706e8a276519fc63f7aa&redirect_uri=https://localhost:9444/coffee_shop/bam.jag&client_id=u8iH1rbGrygWsXPDIA_0wlpGt7Aa&client_secret=TGD7VTCPaE9cfNpM19fm9un2J3Ea>*


I am getting

{

   - error: "invalid_grant",
   - error_description: "Provided Authorization Grant is invalid."

}

What could the problem be?

Cheers~
-- 
Chan (Dulitha Wijewantha)
Software Engineer - Mobile Development
WSO2Mobile
Lean.Enterprise.Mobileware
 * ~Email       duli...@wso2.com <duli...@wso2mobile.com>*
*  ~Mobile     +94712112165 <%2B94712112165>*
*  ~Website   dulitha.me <http://dulitha.me>*
*  ~Twitter     @dulitharw <https://twitter.com/dulitharw>*
  *~Github     @dulichan <https://github.com/dulichan>*
  *~SO     @chan <http://stackoverflow.com/users/813471/chan>*
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to