Code Repository: https://github.com/gsu-library/YOURLS-OIDC
Forked From: https://github.com/joshp23/YOURLS-OIDC
Author: Matt Brooks [email protected]
Date Created: 2023-10-10
License: GPLv3
Version: 1.1.0
This plugin enables authentication against a generic OpenID Connect server in YOURLS.
- PHP >= 7.4.0
- jumbojett/OpenID-Connect-PHP library
- Composer
- PHP-cURL extension
- PHP-JSON extension
- Clone this repository into the
YOURLS_BASE_FOLDER/user/plugins/
folder. - Run
composer install
in that directory to fetch the OIDC library and its requirements. - Configure the plugin (see below).
- Activate the plugin in the Manage Plugins menu.
Copy and configure the code below into the YOURLS configuration file: YOURLS_BASE_FOLDER/user/config.php
. The provider URL and client ID are required and must not be empty. All other configuration constants are optional.
// OpenID Connect configuration
const OIDC_PROVIDER_URL = '';
const OIDC_CLIENT_ID = '';
const OIDC_CLIENT_SECRET = '';
const OIDC_AUTH_METHODS = [];
const OIDC_SCOPES = [];
const OIDC_REDIRECT_URL = '';
const OIDC_TOKEN_ENDPOINT = '';
const OIDC_USER_INFO_ENDPOINT = '';
const OIDC_LOGOUT_ENDPOINT = '';
const OIDC_ERROR_MESSAGE = '';
const OIDC_USERNAME_FIELD = '';
Forked from joshp23/YOURLS-OIDC by Joshua Panter.