Hello All,
I want to create AEM bundle as my custom authentication.
Can some one help me out the right steps with implementation example.
Regards
Qamar
Solved! Go to Solution.
Views
Replies
Total Likes
Thanks Arun for quick reply. Will check and update.
Regards
Qamar
Views
Replies
Total Likes
Hello Arun,
Thanks for post. Now I have successfully implemented my custom authentication handler bundle. Now on next step I am trying to login with my username and password by using http://[localhost]:[port]/j_mycustom_security_check?j_username=[user]&j_password=[password] so that I can get login session token as below
//Extract data from request Object
public AuthenticationInfo extractCredentials(HttpServletRequest request, HttpServletResponse response) {
if (REQUEST_METHOD.equals(request.getMethod()) && request.getRequestURI().endsWith(REQUEST_URL_SUFFIX)) {
log.info("extractCredentials "+request.getParameter(USER_NAME)+request.getParameter(PASSWORD));
URL objurl = new URL("http://[localhost]:[port]/j_security_check?j_username=[user]&j_password=[password]");
HttpURLConnection connect = (HttpURLConnection) objurl.openConnection();
connect .setRequestMethod("POST");
connect .setDoOutput(true);
connect .setDoInput(true);
connect .setRequestProperty("Content-Type", "application/json;charset=utf-8");
connect .connect();
int iCode = connect .getResponseCode();
}
}
Can you help me what is going incorrect here? I am getting 403 error.
Regards
Qamar
Views
Replies
Total Likes
Hi,
It could be a permission issue.Try to hit URL from browser
and check this 403 forbidden error on dispacther url for j_security_check
Views
Replies
Total Likes
Hi Arun,
Ok I will check the permission and firewall and try to post request for j_security_check login. Also will check the redirected post link.
Thanks
Qamar
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies