2017 © Pedro Peláez
 

library laravel-socialite-api

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

image

ray-cheng/laravel-socialite-api

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

  • Tuesday, December 27, 2016
  • by Ray-Cheng
  • Repository
  • 1 Watchers
  • 5 Stars
  • 165 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)


*notice:, (*2)

From laravel 5.2 you don't need this package anymore, because SocialiteProviders support get user by token from 2.0, (*3)


Install

composer require ray-cheng/laravel-socialite-api

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

LaravelSocialiteApi\SocialiteApiServiceProvider::class

to 'providers' array, (*5)

check installed

php artisan list, (*6)

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), (*7)

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

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

27/12 2016

dev-master

9999999-dev

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.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