Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - Lightweight Auth System based on Redux Auth 2

[eluser]patie[/eluser]
[quote author="Ben Edmunds" date="1273183919"]patie,

Yes the model is required, it is there for the library to interact with the database. The model shouldn't be referenced directly though as it all goes through the library.

The required files are the library, model, config, and at least one language.[/quote]

OK sorry my bad because i change line in config i change to
Code:
$config['identity'] = 'login';
but identify must be email or username

i love codeigniter and ion_auth Smile thanks

[eluser]Ben Edmunds[/eluser]
patie,

Glad your having fun!

[eluser]Larry Rubin[/eluser]
In your README for Ion Auth you recommend using encrypted database sessions.

Does this require any additional steps beyond the following:

1) Create the ci_sessions database table:

Code:
CREATE TABLE IF NOT EXISTS  `ci_sessions` (
session_id varchar(40) DEFAULT '0' NOT NULL,
ip_address varchar(16) DEFAULT '0' NOT NULL,
user_agent varchar(50) NOT NULL,
last_activity int(10) unsigned DEFAULT 0 NOT NULL,
user_data text NOT NULL,
PRIMARY KEY (session_id)
);

2) Modify config.php

a) "Encryption Key" setting

Code:
$config['encryption_key'] = "[ 32 char random string]";

b) "Session Variables" settings

Code:
$config['sess_cookie_name']        = 'ci_session';
$config['sess_expiration']        = 7200;
$config['sess_encrypt_cookie']    = TRUE; // installation default is FALSE
$config['sess_use_database']    = TRUE; // installation default is FALSE
$config['sess_table_name']        = 'ci_sessions';
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent']    = TRUE;
$config['sess_time_to_update']     = 300;

Thanks in advance for your help, and for the tremendous effort with Ion Auth.

[eluser]Ben Edmunds[/eluser]
Lawrence,

Yep, that should be good

[eluser]tobefound[/eluser]
@ben: Agree. Didn't think about it that way. Thx for helping out Ben, your effort is much appreciated.

I heard Ellis (from EllisLab I guess) was working on a CI core authentication lib. Any chance he will eyeball yours and Phil's contribution?

[eluser]tobefound[/eluser]
Sorry for double posting here. I'm hooking your Ion Auth into my existing ajax code and I happened to read an article on Phil's RESTful CI framework (http://philsturgeon.co.uk/news/2009/06/R...odeIgniter).

Would be fantastic to see how that framework together with Ion Auth performs, maybe this already is a work in progress? The match would be perfect.

/T

[eluser]Timothy_[/eluser]
Ok so I did a bit of debugging and found:

Quote:A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `0` = '[email protected]'' at line 2

SELECT COUNT(*) AS `numrows` WHERE `0` = '[email protected]'

is happening during

Code:
if (empty($identity) || empty($password) || !$this->identity_check($identity))
        {
            return FALSE;
        }

which is referring to
Code:
protected function identity_check($identity = '')
    {
        if (empty($identity))
        {
            return FALSE;
        }

        return $this->db
            ->where($this->identity_column, $identity)
            ->count_all_results($this->tables['users']) > 0;
    }

I have also found that
Code:
$this->identity_column
is returning 0, which means
Code:
$this->identity_column = $this->config->item('identity', 'ion_auth');
is screwed...

Why?

Well because Redux Auth 2 required its 'config' file to be autoloaded I had simply changed it to auto load Ion Auth, which seems to not like being autoloaded from the autoload file.

As soon as I removed that autoload I was able to login.

Thanks,

Tim

[eluser]Ben Edmunds[/eluser]
Tim,

Thanks for the debug man, hopefully that'll help someone in the future.

The only thing I can think of without looking into the loader class is this:

1. The config is autoloaded into the config array
2. Ion Auth tries to load the config file into the config array as config['ion_auth'] but the loader doesn't load it since it is already loaded.
3. The identity column is being referenced as config['ion_auth'] because of the second parameter but it can't find it.


That's my best guess without checking into it more...

[eluser]Ben Edmunds[/eluser]
tobefound,

I would assume that EllisLab would write their own from scratch as that seems to be their style but of course I would have no issue with them adopting Ion Auth.

In regards to Ion Auth with ajax and rest, I'm actually working on a project right now that uses Ion Auth in conjunction with ajax and rest for authentication but I won't be able to release any of the source code. Maybe I'll make some nice examples in a couple months when I have time...

[eluser]tobefound[/eluser]
@ben:

Time (or the lack of) is what kills us... Anyway, sounds cool. I'm well on my way adopting the RESTful thinking with your Ion lib and I think it will fly just fine.

Cheers!




Theme © iAndrew 2016 - Forum software by © MyBB