To use this Session session =
resourceResolver.adaptTo(Session.class);need resourceResolver object
which can get it via ResourceResolverFactory , below source code to get
resource resolver , need to pass param object which will have system
session = resourcerResolver.adaptTo(Session.class);session.getUserID();
// this give system user idbelow code getAdministrativeResourceResolver
method to get resourceRe...
is there way to get current author logged in user in OSGI
service/handler where we don't have slingHttpRequest object. sling
servlet easily current user id can get via below code (if i have logged
to AEM author instance as testuser, USER id gives here
testuser)ResourceResolver resourceResolver =
resourceResolver.adaptTo(Session.class);String userId =
session.getUserID()LOGGER.info("USER ID :" + userID);but if same things
trying to get in customhandler clas...