Authenticaiton Problem.

A place for users and developers of the Xataface to discuss and receive support.

Authenticaiton Problem.

Postby silvanet » Fri Jul 24, 2009 2:47 pm

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?
silvanet
 
Posts: 2
Joined: Fri Jul 24, 2009 2:41 pm

Postby shannah » Fri Jul 24, 2009 4:09 pm

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();
    }
}
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby silvanet » Fri Jul 24, 2009 5:50 pm

Thanks. That did it. Also thanks for your framework. It is super helpful. for making making a web based data entry program.
silvanet
 
Posts: 2
Joined: Fri Jul 24, 2009 2:41 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved