2017 © Pedro Peláez
 

library laravel-socialite-api

package for laravel 5.2 retrieve user datas serve for restful api authentication.

image

turbo124/laravel-socialite-api

package for laravel 5.2 retrieve user datas serve for restful api authentication.

  • Friday, November 25, 2016
  • by turbo124
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Laravel Socialite api

This package is aim to retrive user data by access token when use OAuth2 Login, base on Laravel Socialite, useful for client side OAuth login, (*1)

Install

composer require ray-cheng/laravel-socialite-api

open config/app.php add, (*2)

LaravelSocialiteApi\SocialiteApiServiceProvider::class

to 'providers' array, (*3)

check installed

php artisan list, (*4)

commands

    laravel-socialite-api:clear  providerName   
    laravel-socialite-api:make   providerName    

this will create a new folder 'Services' under app(or your base namespace folder), (*5)

** providerName must follow http://socialiteproviders.github.io/#providers principle **, (*6)

add event handler and listener to App\Providers\EventServiceProvider $listen property

    'SocialiteProviders\Manager\SocialiteWasCalled' => [
        'App\LaravelSocialiteApi\ExtendSocialite\Weibo@handle',
        'App\LaravelSocialiteApi\ExtendSocialite\Weixin@handle',
    ]

test

    $userInfo = Socialite::with('weibo')->stateless->user($accessToken);
    some oauth server like weixin need both $token and  $openid to get userinfos, so we need pass openid also.
    $userInfo = Socialite::with('weixin')->stateless->user($accessToken, $openId);

The Versions

25/11 2016

dev-master

9999999-dev

package for laravel 5.2 retrieve user datas serve for restful api authentication.

  Sources   Download

MIT

The Requires

 

by Ray Cheng

laravel api authentication restful oauth2 socialete

06/01 2016

1.5

1.5.0.0

package for laravel 5.1 retrieve user datas serve for restful api authentication.

  Sources   Download

MIT

The Requires

 

by Ray Cheng

laravel api authentication restful oauth2 socialete

06/01 2016

1.4

1.4.0.0

package for laravel 5.1 retrieve user datas serve for restful api authentication.

  Sources   Download

MIT

The Requires

 

by Ray Cheng

laravel api authentication restful oauth2 socialete

31/12 2015

1.3

1.3.0.0

package for laravel 5.1 retrieve user datas serve for restful api authentication.

  Sources   Download

MIT

The Requires

 

by Ray Cheng

laravel api authentication restful oauth2 socialete

28/12 2015

1.2

1.2.0.0

package for laravel 5.1 retrieve user datas serve for restful api authentication.

  Sources   Download

MIT

The Requires

 

by Ray Cheng

laravel api authentication restful oauth2 socialete

16/11 2015

1.1

1.1.0.0

package for laravel 5.1 retrieve user datas serve for restful api authentication.

  Sources   Download

MIT

The Requires

 

by Ray Cheng

laravel api authentication restful oauth2 socialete

16/11 2015

1.0

1.0.0.0

package for laravel 5.1 retrieve user datas serve for restful api authentication.

  Sources   Download

MIT

The Requires

 

by Ray Cheng

laravel api authentication restful oauth2 socialete