2017 © Pedro Peláez
 

library laravel-oauth2-smartrecruiters

A Laravel 5.2 service provider for league/oauth2-smartRecruiters

image

krdinesh/laravel-oauth2-smartrecruiters

A Laravel 5.2 service provider for league/oauth2-smartRecruiters

  • Monday, October 2, 2017
  • by krdinesh
  • Repository
  • 1 Watchers
  • 0 Stars
  • 79 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

krdinesh/laravel-oauth2-smartrecruiters

krdinesh/laravel-oauth2-smartrecruiters is a Laravel 5.2 service provider for krdinesh/oauth2-smartrecruiters., (*1)

Installation

The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:, (*2)

composer require krdinesh/laravel-oauth2-smartrecruiters

After requiring the package with Composer, you'll need to add the following to the providers array in config/app.php:, (*3)

``` php Krdinesh\Laravel\OAuth2\SmartRecruiters\SmartRecruitersServiceProvider::class, (*4)


Then, add the following to the `aliases` array in the same file: ``` php 'SmartRecruiters' => Krdinesh\Laravel\OAuth2\SmartRecruiters\Facades\SmartRecruiters::class

Now, run the following to properly set up the package with your Laravel application:, (*5)

``` bash php artisan vendor:publish, (*6)


Finally, Add your client ID, client secret, and redirect URI to `config/smartrecruiters.php`. ## Examples Create an authorization URL and redirect users to it in order to request access to their SmartRecruiters account: ``` php $authUrl = SmartRecruiters::authorize([], function ($url, $provider) use ($request) { $request->session()->put('smartrecruitersState', $provider->getState()); return $url; }); return redirect()->away($authUrl);

In the route for the redirect URI, check the state and authorization code, and use the code to get an access token. Store the token to the session or to the user's profile in your data store., (*7)

``` php if (!$request->has('state') || $request->state !== $request->session()->get('smartrecruitersState')) { abort(400, 'Invalid state'); }, (*8)

if (!$request->has('code')) { abort(400, 'Authorization code not available'); }, (*9)

$token = SmartRecruiters::getAccessToken('authorization_code', [ 'code' => $request->code, ]);, (*10)

$token->getToken(); ```, (*11)

The krdinesh/laravel-oauth2-smartrecruiters library is copyright ©Dinesh kumar and licensed for use under the MIT License (MIT). Please see LICENSE for more information., (*12)

The Versions

02/10 2017

dev-master

9999999-dev

A Laravel 5.2 service provider for league/oauth2-smartRecruiters

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar krdinesh

laravel oauth2 laravel 5.2 smartrecruiters

02/10 2017

dev-develop

dev-develop

A Laravel 5.2 service provider for league/oauth2-smartRecruiters

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar krdinesh

laravel oauth2 laravel 5.2 smartrecruiters

02/10 2017

v1.0.0

1.0.0.0

A Laravel 5.2 service provider for league/oauth2-smartRecruiters

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar krdinesh

laravel oauth2 laravel 5.2 smartrecruiters