Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhollmann committed Aug 3, 2024
1 parent 428caf8 commit 0547bfe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/Access/Controllers/ConnectController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@ class ConnectController extends Controller
/**
* The Authentication Provider Instance
*/
protected VatgerConnectProvider $provider;
protected VatsimConnectProvider|VatgerConnectProvider $provider;

/**
* Initialize the Controller with a new ConnectProvider instance
*/
public function __construct()
{
$this->provider = new VatgerConnectProvider();
if (config('connect.use_vatger')) {
$this->provider = new VatgerConnectProvider();
} else {
$this->provider = new VatsimConnectProvider();
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions app/Config/connect.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
return [
'use_vatger' => env('USE_VATGER_AUTH', false),
'name' => env('VATSIM_OAUTH_NAME', 'VATSIM Connect'),
'base' => env('VATSIM_OAUTH_BASE', 'https://auth-dev.vatsim.net'),
'id' => env('VATSIM_OAUTH_CLIENT', 0),
Expand Down

0 comments on commit 0547bfe

Please sign in to comment.