I have SAML 2.0 Authentication Handler working (ootb) and directing to my AEM html page after login.
This page is secured via the Authentication Requirements property in Apache Sling Authentication Service.
It creates a rep:User node (Autocreate CRX Users is enabled) and Properties according to the Synchronized Attributes.
I now want to get those Properties from my AEM html page.
Can someone explain how this is achieved?
Solved! Go to Solution.
Views
Replies
Total Likes
The Profile interface has been deprecated since CQ 5.5 The preferred way to do this now is:
UserProperties userProps = slingRequest.adaptTo(UserProperties.class); String email = userProps.getProperty("email"); // or whatever
See http://dev.day.com/docs/en/cq/current/javadoc/com/adobe/granite/security/user/UserProperties.html
Views
Replies
Total Likes
Are you trying to fetch user info in your jsp? You can always iterate over the fetch user profile node -
Profile currentProfile = slingRequest.adaptTo(Profile.class);
String profilePath = currentProfile.getPath() ;
if(session.itemExists(profilePath )) {
Node n = session.getNode(profilePath );
String id = n.getProperty("<your node prop>").getString();
// do your stuff
}
Views
Replies
Total Likes
The Profile interface has been deprecated since CQ 5.5 The preferred way to do this now is:
UserProperties userProps = slingRequest.adaptTo(UserProperties.class); String email = userProps.getProperty("email"); // or whatever
See http://dev.day.com/docs/en/cq/current/javadoc/com/adobe/granite/security/user/UserProperties.html
Views
Replies
Total Likes
Appreciate for this info Justin!
I've seen Profile interface is being used in some OOTB component in 5.6.1 but in AEM6 uses UserProperties
Views
Replies
Total Likes
Thanks guys!.
The following article helps me as well
http://helpx.adobe.com/aem-forms/6/prepopulate-adaptive-form-fields.html
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies