I am trying to authenticate my users against OAuth2 module in OpenAM using REST. On trying to consume the module by calling the OpenAM module using Rest Template, OpenAM returns with the request Callback URL which is the redirect URL in openAM i.e. http://local.openAM:22080/openAM/oauth2c/OAuthProxy.jsp. On doing a GET to this URL, I get a "Request Not Valid!" html page in response. However, on trying to hit the OpenAM OAuth2 module directly from my browser, I get the success page and the redirect to http://local.openAM:22080/openAM/oauth2c/OAuthProxy.jsp is successful. Is there something I am missing? Can anyone help me with this? I am not willing to move my login page to OpenAM and thus I am using REST.
Asked
Active
Viewed 541 times
1 Answers
0
Figured out the problem here.
http://local.openAM:22080/openAM/oauth2c/OAuthProxy.jsp expects a parameter "code" which is the code returned from the OAuth2 provider. On not receiving this parameter in the request, it throws a "Request not Valid!" error. So the request should be like:

Tejansh Rana
- 23
- 5