UserOidcService.php 777 B

123456789101112131415161718192021
  1. <?php
  2. namespace App\Services;
  3. use League\OAuth2\Client\Provider\GenericProvider;
  4. class UserOidcService extends GenericProvider {
  5. public static function build()
  6. {
  7. return new UserOidcService([
  8. 'clientId' => config('remote-auth.oidc.clientId'),
  9. 'clientSecret' => config('remote-auth.oidc.clientSecret'),
  10. 'redirectUri' => url('auth/oidc/callback'),
  11. 'urlAuthorize' => config('remote-auth.oidc.authorizeURL'),
  12. 'urlAccessToken' => config('remote-auth.oidc.tokenURL'),
  13. 'urlResourceOwnerDetails' => config('remote-auth.oidc.profileURL'),
  14. 'scopes' => config('remote-auth.oidc.scopes'),
  15. 'responseResourceOwnerId' => config('remote-auth.oidc.field_id'),
  16. ]);
  17. }
  18. }