2017 © Pedro Peláez
 

library steam-login

A simple PHP Steam login and validation package

image

captbrogers/steam-login

A simple PHP Steam login and validation package

  • Saturday, August 12, 2017
  • by captbrogers
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 10 % Grown

The README.md

PHP Steam Login

Forked from Ehesp/Steam-Login to focus on being specific and updated for Laravel., (*1)

This package enables you to easily log users in via Steam, using their OpenID service. However, this package does not require that you have the OpenID PHP module installed!, (*2)

Note: The package can also easily be used with the Laravel 5.3+ PHP Framework., (*3)

Installation

Begin by installing this package via Composer:, (*4)

{
    "require": {
        "captbrogers/steam-login": "~1.0"
    }
}

Add Service Provider and Facade

If you're using the Laravel 5.3+ PHP Framework, add the following to your config/app.php file's providers array:, (*5)

Captbrogers\SteamLogin\Laravel\SteamLoginServiceProvider::class,

And the following to your aliases array in the same file:, (*6)

'SteamLogin' => Captbrogers\SteamLogin\Laravel\Facades\SteamLogin::class,

You now have access to the SteamLogin facade., (*7)

Usage

Before starting, please note you're unable to redirect a user to the Steam OpenID login portal. In other words, they must be able to click the link themselves., (*8)

Use the SteamLogin class and create a new instance of it:, (*9)

// view.blade.php
<a href="{{ SteamLogin::url() }}">Login via Steam!</a>

To validate the Steam Login:, (*10)

// routes/web.php
Route::get('/', function()
{
    return SteamLogin::validate();
});

Changing the return URL

The return URL must be a valid URL which contains either the http or https URI scheme., (*11)

If you want your users to be sent to a specific URL/route after login, this is easily done. Simply add the URL as a parameter in the url() method:, (*12)

// config/services.php
'steam' => [
    'login' => 'http://mywebsite.com/login',
],

Then simply access this in the url method:, (*13)

SteamLogin::url(config(('services.steam.login'));

To Do

  • Add PHPUnit tests

The Versions

12/08 2017

dev-master

9999999-dev

A simple PHP Steam login and validation package

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Elliot Hesp

steam

12/08 2017

v1.0.0

1.0.0.0

A simple PHP Steam login and validation package

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Elliot Hesp

steam