GithubHelp home page GithubHelp logo

laravel-steam-auth's Introduction

Steam authentication for laravel 5

Latest Stable Version Total Downloads License

This package is a Laravel 5 service provider which provides Steam OpenID and is very easy to integrate with any project which requires steam authentication.

Installation Via Composer

Add this to your composer.json file, in the require object:

"invisnik/laravel-steam-auth": "1.1.*"

After that, run composer install to install the package.

Add the service provider to app/config/app.php, within the providers array.

'providers' => array(
	// ...
	'Invisnik\LaravelSteamAuth\SteamServiceProvider',
)
'aliases' => array(
	// ...
	'SteamAuth' => 'Invisnik\LaravelSteamAuth\Facades\SteamAuth',
)

You how have access to the SteamAuth facade.

Lastly, publish the config file.

php artisan vendor:publish

Usage

use Invisnik\LaravelSteamAuth\SteamAuth;

class SteamController extends Controller {

    /**
     * @var SteamAuth
     */
    private $steam;

    public function __construct(SteamAuth $steam)
    {
        $this->steam = $steam;
    }

	public function getLogin()
	{

        if( $this->steam->validate()){
            return  $this->steam->getSteamId();  //returns the user steamid
        }else{
            return  $this->steam->redirect(); //redirect to steam login page
        }
	}
}

laravel-steam-auth's People

Contributors

invisnik avatar scotty0100 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.