rebuild
This commit is contained in:
19
partials/landingpages/auth/login.php
Normal file
19
partials/landingpages/auth/login.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
use App\OidcClient;
|
||||
|
||||
$config = app()->config();
|
||||
if (!$config->authEnabled) {
|
||||
echo '<div class="card">Auth ist deaktiviert.</div>';
|
||||
return;
|
||||
}
|
||||
|
||||
$session = app()->session();
|
||||
$session->start();
|
||||
|
||||
$state = bin2hex(random_bytes(16));
|
||||
$nonce = bin2hex(random_bytes(16));
|
||||
$_SESSION['oidc_state'] = $state;
|
||||
$_SESSION['oidc_nonce'] = $nonce;
|
||||
|
||||
$client = new OidcClient($config);
|
||||
redirect($client->authUrl($state, $nonce));
|
||||
Reference in New Issue
Block a user