Welcome Guest, Not a member yet? Register   Sign In
Redux Authentication 1.4a (24th July 2008)

[eluser]Popcorn[/eluser]
alekz : Thank you for providing this addon. You have given me something to consider for the next version of Redux.

I appreciate the code samples.

johnleeharris : You will have to make the backend yourself to control if the user is banned or not. This is to provide maximum flexibility to the developer in which way they implement it.

Isern Palaus : That is correct, the examples are outdated and I am planning to add the get_username, etc ... and other methods to a helper where they are more suited in my opinion.

Thank you for providing code samples for other users.

[eluser]alekz[/eluser]
Hi, popcorn thank's for all.
I was working with the code of my last post and i have some improvements to make this more powerful an easy to use, this are my improvements

first i made a change to the has_permissions function...
Code:
public function has_permissions()
{
    $controller = '/'.$this->ci->uri->rsegment(1).'/';
        $function = $controller.$this->ci->uri->rsegment(2);
    if(isset($this->permissions[$function]))
        return $this->_get_permissions($this->permissions[$function]);
    else if(isset($this->permissions[$controller]))
        return $this->_get_permissions($this->permissions[$controller]);
    else return -1;
}

by this way we can give a major priority to controller/function permission over a global controller permision.

i found that can be more convinient if this can works in transparent mode, thats mean that we dont be worried about put a piece of code on every constructor to check if the user has permissions, so i made inherit the Controller core class with MY_Controller put this code in a file named MY_Controller.php under applications/Library folder
Code:
<?php
class MY_Controller extends Controller {

    function MY_Controller()
    {
        parent::Controller();
        if(!$this->redux_auth->has_permissions())
            redirect(''); //<-- here you can redirect to wherever you want
    }
}
?&gt;
all you need to do is inherit your controllers from MY_Controller, and all your application will be using a Controller/Function based access control

im working in another has_permissions function that use the name of group instead of id_group to make more readable the configuration of the permissions.
Code:
//using group id's
$config['auth']['permissions']['/controller1/function1'] = array(1, 2);  
//using name of groups
$config['auth']['permissions']['/controller1/function1'] = array('admin', 'publisher');
i think this gonna be a great change...

i'm using this addon in two projects that i'm working and is great for my entire applications and pretty convenient to protect my ajax functions...

if you use this please comment for a bug...

Adios...

[eluser]bennyhill[/eluser]
I am pretty new to codeigniter. I have a front end done and want to begin creating a backend CMS. I really want to use this addon but am totally lost on how to use it. Can someone point me in the direction of a tutorial. A video one like CodeIgniter did on their framework would be awesome.

[eluser]Omar Sadik[/eluser]
First of all, i would like to thank to all the comunity and developers of this great framework.
I'm a begginer in php, and have a couple of questions about this great lib:

1. - How do I encrypt a password if updating a user profile, for example in a administration section?

2. - Does anyone have a more extensive documentation for this lib? (like i said I´m a newbie and some things are not so clear to me at first sight).

3. - I'm having troubles to find where $this->salt come from.

example;
file: redux_auth.php (line 72)
Code:
$password_enc = sha1($this->salt.$hash.$password);


Thanks to all

[eluser]Popcorn[/eluser]
Sorry for the lack of "true" documentation. College has had me pinned to the floor with assignments. I will update them in around a weeks time when I have more time.

bennyhill : It's a good idea. I'll see if I can video some tutorials later this week.

Omar Sadik : I think you need to learn php properly first and CodeIgniter and before you jump into using Redux Auth. It wasn't aimed at the beginner market.

$this->salt comes from the config/redux_auth.php file.

[eluser]Omar Sadik[/eluser]
Thanks for the info Popcorn and for the fast reply!

I will have a look to that config file (I didn't spent much time analysing it, i must confess).

keep up with the good work, and again thank you for the fast reply ;)

[eluser]CARP[/eluser]
Hi PopCorn
I've got your library, the latest version, 1.3b, installed it without problems, etc.
I've not seen yet the user controller example, but I think it would be very nice if you just write a lot shorter tutorial than this one (for example)

http://www.4webby.com/freakauth/document...light.html

so at least we (dummy CI users) learn it following some small tuto, step by step. I think that's the best way. Hope you have some time to do this soon

[eluser]Popcorn[/eluser]
Thanks Omar Sadik, CARP

CARP : I am currently tweaking redux and going to release a version 1.4 and also have an updated users controller for people to look at. The documentation will also be improved massively in the next couple of weeks.

[eluser]CARP[/eluser]
[quote author="Popcorn" date="1214413091"]Thanks Omar Sadik, CARP

CARP : I am currently tweaking redux and going to release a version 1.4 and also have an updated users controller for people to look at. The documentation will also be improved massively in the next couple of weeks.[/quote]

Cool news. I can help with the docs stuff, so lemme know. Thanks

[eluser]Popcorn[/eluser]
Some progress on version 1.4

Features
Updated example user controller to latest version
{activation_code} now available to use in registration email activation message

Optimisations

Email messages now using str_replace() (Thanks Inparo)
Removed automatic loading of libraries (It's better to have them loaded in one place)

Misc
Updated install.sql to include sample data for groups, users, secret questions and countries

Bug Fixes for 1.4
Removed duplicate entry in the countries table.

I need to make a helper to grab user information such as username, etc ... and as I already stated there will be a massive update to the documentation.




Theme © iAndrew 2016 - Forum software by © MyBB