Search in sources :

Example 1 with FormCredentials

use of org.apache.sling.auth.form.impl.jaas.FormCredentials in project sling by apache.

the class FormAuthenticationHandler method createAuthInfo.

private AuthenticationInfo createAuthInfo(final String authData) {
    final String userId = getUserId(authData);
    if (userId == null) {
        return null;
    }
    final AuthenticationInfo info = new AuthenticationInfo(HttpServletRequest.FORM_AUTH, userId);
    if (jaasHelper.enabled()) {
        //JcrResourceConstants.AUTHENTICATION_INFO_CREDENTIALS
        info.put("user.jcr.credentials", new FormCredentials(userId, authData));
    } else {
        info.put(attrCookieAuthData, authData);
    }
    return info;
}
Also used : FormCredentials(org.apache.sling.auth.form.impl.jaas.FormCredentials) AuthenticationInfo(org.apache.sling.auth.core.spi.AuthenticationInfo)

Aggregations

AuthenticationInfo (org.apache.sling.auth.core.spi.AuthenticationInfo)1 FormCredentials (org.apache.sling.auth.form.impl.jaas.FormCredentials)1