Skip to content

Instantly share code, notes, and snippets.

@melvincarvalho
Created April 9, 2010 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melvincarvalho/361313 to your computer and use it in GitHub Desktop.
Save melvincarvalho/361313 to your computer and use it in GitHub Desktop.
Run the following commands from a shell to be up and running with a FOAF+SSL service. No external libraries or configuration is required.
Nor is HTTPS required. If you are not running on localhost, replace that with the name of your server.
git clone git://github.com/melvincarvalho/libAuthentication.git
cat > index.php
<?php
require_once('libAuthentication/lib/Authentication.php');
$auth = new Authentication_FoafSSLDelegate();
if (!$auth->isAuthenticated()) {
echo '<a href="https://foafssl.org/srv/idp?authreqissuer=http://localhost/index.php">Click here to Login</a>';
} else {
echo 'Your have succesfully logged in.<pre>';
print_r($auth);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment