FSCAuth Porting to PHP

Hello, I'll be honest with you all. FSCAuth was kind of a failure. It's awesome and all, but for some reason people just aren't interested in it.

I evaluated the .Net market and saw that quite a few people are happy with the (more difficult) Forms Authentication... But, there is one market that I was into years ago that had no official form of authentication, PHP. So, I looked into the existing PHP authentication solutions and saw, well a big lack of libraries out there.

So, I've began working on a port to FSCAuth to PHP. I aim to support all of the functions supported in the .Net version, with a few notable syntax-related changes that comes with porting to a different language. But basically, it should be capable of all of the same things. To list them again:

  1. Keeping track of salts(therefore allowing for Blowfish and similar algorithm support)
  2. Simple 4 function user store
  3. Easy to configure, just change a few configuration options, hook up the userstore to your database, and put the login calls in needed places in your application.

So, what's it going to look like? It'll basically look like the .Net version, a big static class.

Here is my test.php class:

<?php
  require("fscauth.php");
?>
...HTML code... 
<?php
  if(array_key_exists("test", $_GET) && $_GET["test"]==="1"){
    //try login
    FSCAuth::Login("foobar","password",false);
    echo '<br /> username: '.FSCAuth::GetCurrentUser()->Username;
  }else{
    //list user
    $user=FSCAuth::GetCurrentUser();
    if($user!=null){
      echo 'username: '.$user->Username.'<br />';
    }else{
      echo 'no one is logged in <br />';
    }

  }
?>

As you can tell, some of the syntax is a bit less.. intuitive, but this is a limitation of PHP.

But anyway, if you're a PHP developer and would like to beta test something like this, just drop me a line at earlz -at- this domain(lastyearswishes.com)

Also, in case you're wondering, the cookies generated WILL be compatible across the .Net and PHP version. So, if you have two applications that share login cookies, this is a very ideal use-case.

Posted: 7/3/2012 5:43:33 AM