Getting CQ5.6 authentication details in a custom auth handler
We have a custom authentication handler. But we want to check if the user is logged into CQ5 for example if they are on the author. I know we could just do an isAuthor check but we want to be able to see which user it is who is signed in. The custom auth is only used on certain parts of the site and grants access depending on info obtained from the commerce aspect of our site but we also want to check who the cq5 user is if anybody. When I say CQ5 user I'm referring to the user who would log in when accessing the author for example on the AEM splash page when first hitting the author url. I have spend quite a bit of time getting no where with this, from what I can see the authentication info is contatinred in a cookie called login-token but I can't work out how to 'decode' that to get the user name and validate the password is correct. Hope this makes sense. (This is on a 5.6 implementation of CQ5).