Skip to content

A simple, tiny and easy to use OpenID Steam authenticator that works everywhere without a need to configure or tinker.

License

Notifications You must be signed in to change notification settings

GreYzZ/BillySteamAuth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BillySteamAuth is the tiniest PHP Steam Authenticator and works everywhere.

##Usage

Create a new directory anywhere you want and add billysteamauth.php and openid.php to it.

##Example

Index page:

session_start();
if (!isset($_SESSION["session variable name"])) {
	header("LOCATION: /login/");
}

Login page:

include("inc/billysteamauth/billysteamauth.php");
$BillySteamAuth = new BillySteamAuth("session variable name");

if (isset($BillySteamAuth -> SteamID)) {
	header("LOCATION: /");
}

if (isset($_POST["login"]) && !isset($_SESSION["session variable name"])) {
	header("LOCATION: " . $BillySteamAuth -> LoginURL());
}

##Other Functions

StripOpenID

Returns $_SERVER["REQUEST_URI"] without the OpenID $_GET variables.

include("inc/billysteamauth/billysteamauth.php");
$BillySteamAuth = new BillySteamAuth("session variable name");

if (isset($BillySteamAuth -> SteamID)) {
	header("LOCATION: /");
}

if (isset($_POST["login"]) && !isset($_SESSION["session variable name"])) {
	header("LOCATION: " . $BillySteamAuth -> LoginURL());
}

if (isset($_GET["openid_identity"])) {
	header("LOCATION: //" . $_SERVER["HTTP_HOST"] . "/" . $BillySteamAuth -> StripOpenID());
}

About

A simple, tiny and easy to use OpenID Steam authenticator that works everywhere without a need to configure or tinker.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages