定制 uptime-development/laravel-socialite-criipto 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

uptime-development/laravel-socialite-criipto

最新稳定版本:v1.0.3

Composer 安装命令:

composer require uptime-development/laravel-socialite-criipto

包简介

A custom Criipto driver for Laravel Socialite

README 文档

README

This package is a custom Criipto driver for Laravel Socialite. This packages may be used for authenticating users with MitID

Installation

You can install the package via composer:

composer require uptime-development/laravel-socialite-criipto

Usage

Once you install the package, you will ned to create a account on https://criipto.id

Add the config values in you config/services.php configuration file from the newly created account:

'criipto' => [
    'base_uri' => env('CRIIPTO_URI'),
    'client_id' => env('CRIIPTO_CLIENT_ID'),
    'client_secret' => env('CRIIPTO_CLIENT_SECRET'),
    'redirect' => env('CRIIPTO_REDIRECT_URI'),
],

You can nowuse the driver as you would use it in the Laravel Socialite's official documentation. Use criipto keyword when you want to use the driver followed with the extra parameter to define the acr_values

Route::get('/auth/redirect', function () {
    return Socialite::driver('criipto')
            ->with(['acr_values' => 'urn:grn:authn:dk:mitid:low'])
            ->redirect();
});
Route::get('/auth/callback', function () {
    $user = Socialite::driver('criipto')->user();
    dd($user);
});

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover any security related issues, please email anders.andersen@uptimedevelopment.dk

License

The MIT License (MIT). Please see License File for more information.

Todo

[ ] Github Action - Should run tests and php-cs-fixer

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-03