OIDC test - test jumbojett oidc round two 1
This commit is contained in:
1 parent
6f8dd7bbe3
commit
65a69b585d
9 files changed
+85
-226
No files matched your search
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
use Jumbojett\OpenIDConnectClient;
|
||||
|
||||
session_start();
|
||||
$config = require __DIR__ . '/../config.php';
|
||||
|
||||
$oidc = new OpenIDConnectClient(
|
||||
$config['provider_url'],
|
||||
$config['client_id'],
|
||||
$config['client_secret']
|
||||
);
|
||||
|
||||
// Tell the library where to return after the user logs in
|
||||
$oidc->setRedirectURL($config['redirect_uri']);
|
||||
|
||||
// Tell it which scopes we want
|
||||
$oidc->addScope($config['scopes']);
|
||||
|
||||
// The OIDC flow we’ll use
|
||||
$oidc->setResponseTypes([$config['response_type']]);
|
||||
|
||||
// Optional: for local development you can relax TLS validation
|
||||
// $oidc->setVerifyHost(false);
|
||||
// $oidc->setVerifyPeer(false);
|
||||
|
||||
$oidc->authenticate(); // This automatically redirects to Authelia
|
||||
Reference in new issue
Block a user