Hi Chan,

Between two requests, redirect_uri got changed..  Can you please try
calling token endpoint using the same redirect_uri used to get
authorization code..

Thanks,


On Fri, May 30, 2014 at 4:49 AM, Chan <[email protected]> wrote:

> 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       [email protected] <[email protected]>*
> *  ~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>*
>



-- 
Regards,


*Darshana Gunawardana *Software Engineer
WSO2 Inc.; http://wso2.com

* E-mail: [email protected] <[email protected]>*
*Mobile: +94718566859 <%2B94718566859> *Lean . Enterprise . Middleware
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to