public Principal authenticate()

in impl/src/main/java/org/apache/directory/fortress/realm/tomcat/TcAccessMgrImpl.java [81:104]


    public Principal authenticate( String userId, String password )
    {
        TcPrincipal principal = null;
        try
        {
            // If a 'default.roles' property set in config, user them
            if ( CollectionUtils.isNotEmpty( defaultRoles ) )
            {
                principal = j2eeMgr.createSession( userId, password, defaultRoles );
                LOG.debug( "{}.authenticate userId [{}], with default roles[{}], successful", CLS_NM, userId, defaultRoles );
            }
            else
            {
                principal = j2eeMgr.createSession(userId, password);
                LOG.debug( "{}.authenticate userId [{}], successful", CLS_NM, userId );
            }
        }
        catch (SecurityException se)
        {
            LOG.warn( "{}.authenticate userId <{}> caught SecurityException=", CLS_NM, userId, se );
        }
        
        return principal;
    }