noopstudios/autenticacaogov

用于允许laravel网站使用OAUTH2.0协议(隐式流程)与AutenticacaoGov通信的包。

v1.0.2 2021-04-09 13:47 UTC

This package is auto-updated.

Last update: 2024-09-09 19:20:52 UTC


README

** 此组件处于开发中。 **

要求

  • PHP >= 7.2.5 | ^8.0
  • Laravel/Socialite >= 5.1.0

用法

Autenticao.Gov 开发者门户

https://www.autenticacao.gov.pt/请求CLIENT_ID和CLIENT_SECRET

安装

composer require noopstudios/autenticacaogov

配置

config/services.php

'autenticacaogov' => [
    'client_id' => env('AUTENTICACAO_GOV_CLIENT_ID'),
    'client_secret' => env('AUTENTICACAO_GOV_SECRET'),
    'redirect' => env('AUTENTICACAO_GOV_REDIRECT')
]

.env

AUTENTICACAO_GOV_AUTHORIZATION_ENDPOINT=
AUTENTICACAO_GOV_TOKEN_ENDPOINT=
AUTENTICACAO_GOV_RESOURCE_API=
AUTENTICACAO_GOV_DOMAIN=

实现

// Redirect to Sign in with Apple in controller.
return Socialite::driver('autenticacaogov')->redirect();

// Handle callback, fetch user information from `code` in controller.
$user = Socialite::driver('autenticacaogov')->user();

许可证

socialite-apple 是开源软件,许可协议为MIT 许可证