I am trying to authenticate a user and getting the user to authorize my application. But, whenever the user authenticates with the system, the redirect url never return back to my application.
In the console output i get the following information message:
INFO: Unable to retrieve OAuth2.0 handler for redirect request tohttps://localhost:8443/sbt.sample.web/service/oauth20_cb. Please check you are accessing the application using the same hostname used in the OAuth 2.0 redirect URI.
Please find below the code:
// Check if user is authenticated, if not redirect to SmartCloud for authentication.
ep= EndpointFactory.getEndpoint("connectionsOA2");
if(!ep.isAuthenticationValid())
{
// Check, Do we have a valid token for this user
ep.authenticate(false);// Authenticate
return; // Exit, JSP would be invoked from Callback handler
}
I am not able to figure out what is the problem. Any help is highly appreciated.