承接 krdinesh/laravel-oauth2-smartrecruiters 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

krdinesh/laravel-oauth2-smartrecruiters

Composer 安装命令:

composer require krdinesh/laravel-oauth2-smartrecruiters

包简介

A Laravel 5.2 service provider for league/oauth2-smartRecruiters

README 文档

README

krdinesh/laravel-oauth2-smartrecruiters is a Laravel 5.2 service provider for krdinesh/oauth2-smartrecruiters.

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:

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:

Krdinesh\Laravel\OAuth2\SmartRecruiters\SmartRecruitersServiceProvider::class

Then, add the following to the aliases array in the same file:

'SmartRecruiters' => Krdinesh\Laravel\OAuth2\SmartRecruiters\Facades\SmartRecruiters::class

Now, run the following to properly set up the package with your Laravel application:

php artisan vendor:publish

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:

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

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

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

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

$token->getToken();

Copyright and License

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.

统计信息

  • 总下载量: 277
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固