If you running AEM on Oak is better you leverage the new native Jaas Osgi native integration support [0] rather than TokenUtil.createCredentials (this create always a token cookie that is not necessary in some situations).
A good example might be the SlingFormAuthenticationHandler [1]
Per @asanso
If you running AEM on Oak is better you leverage the new native Jaas Osgi native integration support [0] rather than TokenUtil.createCredentials (this create always a token cookie that is not necessary in some situations).
A good example might be the SlingFormAuthenticationHandler [1]
[0] http://felix.apache.org/documentation/subprojects/apache-felix-jaas.html [1] http://svn.apache.org/repos/asf/sling/trunk/bundles/auth/form/src/main/java/org/apache/sling/auth/form/impl/FormAuthenticationHandler.java