Created
September 4, 2022 10:57
-
-
Save lauritzh/0d68c11b6869b4778e6726488facafc8 to your computer and use it in GitHub Desktop.
Mocked OIDC Discovery Response
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* (c) Lauritz Holtmann, https://security.lauritz-holtmann.de | |
* | |
* Could be for instance launched as follows: | |
* $ php -S 127.0.0.1:1234 | |
* $ ngrok http 1234 | |
* | |
* Visit https://something.ngrok.io/oidc_dicovery.php | |
*/ | |
$issuer = "https://security.lauritz-holtmann.de"; | |
$authorization_endpoint = "https://security.lauritz-holtmann.de/auth"; | |
$token_endpoint = "https://security.lauritz-holtmann.de/token"; | |
$userinfo_endpoint = "https://security.lauritz-holtmann.de/userinfo"; | |
$introspection_endpoint = "https://security.lauritz-holtmann.de/introspection"; | |
$jwks_uri = "https://security.lauritz-holtmann.de/jwks"; | |
$registration_endpoint = "https://security.lauritz-holtmann.de/registration"; | |
$data = array( | |
"issuer" => $issuer, | |
"authorization_endpoint" => $authorization_endpoint, | |
"token_endpoint" => $token_endpoint, | |
"userinfo_endpoint" => $userinfo_endpoint, | |
"introspection_endpoint" => $introspection_endpoint, | |
"jwks_uri" => $jwks_uri, | |
"registration_endpoint" => $registration_endpoint, | |
"response_types_supported" => array("code","token id_token"), | |
"subject_types_supported" => array("public","pairwise"), | |
"id_token_signing_alg_values_supported" => array("RS256") | |
); | |
header('Content-Type: application/json; charset=utf-8'); | |
die(json_encode($data)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to serve the above PHP script using the built-in web server, you may need to create a custom
router.php
:You may then launch the server as follows:
$ php -S 127.0.0.1:1234 router.php