Page 1 of 1

Authenticaiton Problem.

PostPosted: Fri Jul 24, 2009 2:47 pm
by silvanet
I am having some issues with logging in
I want all users to log in to view the database.

In my config.ini I have this:
[_auth]
users_table=users
username_column=username
password_column=password
require_login=yes

When I have this set, I get this from my firefox web browser:

Redirect Loop
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

When I take the requre_login=yes out, it does not give the error but it does not give me a place to log in either.

Can someone give me some direction to diagnose this issue?

PostPosted: Fri Jul 24, 2009 4:09 pm
by shannah
Perhaps a problem with the require_login directive. Instead of using require_login, add a getPermissions() method to your application delegate class:

Code: Select all
function getPermissions(&$record0{
    $auth =& Dataface_AuthenticationTool::getInstance();
    if ( $auth->isLoggedIn() ){
         return Dataface_PermissionsTool::ALL();
    }
    else {
        return Dataface_PermissionsTool::NO_ACCESS();
    }
}

PostPosted: Fri Jul 24, 2009 5:50 pm
by silvanet
Thanks. That did it. Also thanks for your framework. It is super helpful. for making making a web based data entry program.