Auth package for fourcms

1.0.2 2017-06-29 15:45 UTC

This package is not auto-updated.

Last update: 2022-09-26 04:35:43 UTC


Master: build status

Table of Contents


Install this package through Composer.

Edit your project's composer.json file to add custom repository and require platfourm/auth

Create composer.json file:

    "name": "yourproject/yourproject",
    "type": "project",
    "require": {
        "platfourm/auth": "dev_master"
    "repositories": [
            "type": "composer",
            "url": ""

And run composer update

After updating composer, add the AuthServiceProvider to the providers array in config/app.php


And add Platfourm\Auth\RemoteUserTrait to your user model.

After in config/auth.php add new guard in guards section

'itdc' => [
    'driver'   => 'session',
    'provider' => 'itdc',

And add provider in providers section

'itdc' => [
    'driver'      => 'itdc', // Driver name
    'model'       => App\User::class, // User model class
    'endpoint'    => '', // Authorization service endpoint
    'check_ip'    => true, // Check allowed or not authorization on service from user's ip
    'auto_save'   => true, // Save remote user in local database on success login. On false will be used cache storage
    'attach_role' => '', // If you are using Entrust Permissions package, provide default role for remote user

After you can change default guard in config/auth.php to itdc:

'defaults' => [
    'guard'     => 'itdc',
    'passwords' => 'users',


You must add application APP_KEY to ITDC Auth servers for authentication


write tests


Please report any bugs you find on the issues page.


Pull requests are welcome. See for information.


Please see the LICENSE included in this repository for a full copy of the proprietary license, which this project is licensed under.