Hi all,
I'm new in Adobe EM so I'd really appreciate some help. I have a custom login form (.jsp) where the username/password are requested. I would like to validate this credentials against repository.
Is there any sample/documentation that I can check to do this?
Thanks a lot in advance for your help!
Best regards.
Solved! Go to Solution.
Hi,
The way I used to do validation was like below :
String login = decodedStr.substring(0, p).trim(); String password = decodedStr.substring(p + 1).trim(); Credentials credentials = new SimpleCredentials(login,password.toCharArray()); Session session = repository.login(credentials);
The login and password I have used is from some string. you can modify as per your requirement os simply user username and password coming in form or from wherever you desire and after this all you have to do is check the session.
Regards,
Samir
Views
Replies
Total Likes
Check login component OOTB. It has login.jsp which makes http call for the authentication and also login.
Locations of the files:
/libs/foundation/components/login
/libs/cq/core/content/login
FYI:
---Jitendra
Views
Replies
Total Likes
Thanks Jitendra!
I have a custom form so I thought I would need custom code to validate the user and I couldn't use OOTB but I'll check the files you mention.
Best regards.
Views
Replies
Total Likes
Hi,
The way I used to do validation was like below :
String login = decodedStr.substring(0, p).trim(); String password = decodedStr.substring(p + 1).trim(); Credentials credentials = new SimpleCredentials(login,password.toCharArray()); Session session = repository.login(credentials);
The login and password I have used is from some string. you can modify as per your requirement os simply user username and password coming in form or from wherever you desire and after this all you have to do is check the session.
Regards,
Samir
Views
Replies
Total Likes
IN addition to the great answers provided by these AEM Community members, I recommend that you watch this AEM Ask the Community Experts on this subject given by Justin:
Building Secure Adobe Experience Manager Web Sites
There is a link to the webinar in the Summary Table at start of article.
Hope this helps.
Views
Replies
Total Likes
Thanks all for your help! I was able to validate the user with the info you provided.
Best regards.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies