2017 © Pedro Peláez
 

library sso-client

Client for the Netsells SSO server

image

netsells/sso-client

Client for the Netsells SSO server

  • Friday, March 23, 2018
  • by spamoom
  • Repository
  • 7 Watchers
  • 0 Stars
  • 27 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 17 % Grown

The README.md

SSO Client

Client for the Netsells SSO. This consumes the headers from Pomerium and integrates them with Laravel's auth system., (*1)

Installation

Add to composer:, (*2)

composer require netsells/sso-client

Add the following environment variable, (*3)

POMERIUM_PUBLIC_KEY=

This is the base64 encoded public key. This is used to detemine that the JWT data came from Pomerium and not an attacker., (*4)

User Provider Setup

The SSO client has two available modes, it can either use your existing auth provider (such as the laravel eloquent auth) or you can use the sso auth user provider (this is typically used when you do not want to store user info, just secure the site)., (*5)

Existing eloquent setup

The SSO middleware expects your auth config to be correctly configured. Specifically auth.providers.users.model as this is the model that is populated and authenticated on your behalf., (*6)

Buy default, the user is created if it does not exist based on the email sent by the SSO server. Should you wish to add more information to the User model (or any other model), you should add the following call to your AppServiceProvider. Have a look at the SSOUser DTO to see what information you can get from the SSO server., (*7)

SSOClient::setUserCallback(function ($user, \Netsells\SSOClient\User $data) {
    $user->first_name = $data->first_name;

    return $user;
});

If you wish to run some code when a user is created or updated via the SSO middleware, you can create the methods ssoUserWasCreated and ssoUserWasUpdated on the model., (*8)

No Database setup

All you need to do is set the config, auth.providers.users.driver to sso. You can now use Auth::user() which will return an SSO User instead of a Laravel user., (*9)

The Versions

23/03 2018

dev-master

9999999-dev

Client for the Netsells SSO server

  Sources   Download

The Requires

 

by Sam Jordan

23/03 2018

1.2.3

1.2.3.0

Client for the Netsells SSO server

  Sources   Download

The Requires

 

by Sam Jordan

23/03 2018

dev-php56

dev-php56

Client for the Netsells SSO server

  Sources   Download

The Requires

 

by Sam Jordan

23/03 2018

1.2.2

1.2.2.0

Client for the Netsells SSO server

  Sources   Download

The Requires

 

by Sam Jordan

23/03 2018

dev-fix-autoloading

dev-fix-autoloading

Client for the Netsells SSO server

  Sources   Download

The Requires

 

by Sam Jordan

23/03 2018

1.2.1

1.2.1.0

Client for the Netsells SSO server

  Sources   Download

The Requires

 

by Sam Jordan

10/01 2018

1.2.0

1.2.0.0

Client for the Netsells SSO server

  Sources   Download

The Requires

 

by Sam Jordan

04/01 2018

1.1.0

1.1.0.0

Client for the Netsells SSO server

  Sources   Download

The Requires

 

by Sam Jordan

13/12 2017

1.0.0

1.0.0.0

Client for the Netsells SSO server

  Sources   Download

The Requires

 

by Sam Jordan