Download the PHP package julabo/keycloak_roles_yourls without Composer

On this page you can find all versions of the php package julabo/keycloak_roles_yourls. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package keycloak_roles_yourls

Keycloak Roles YOURLS Plugin

A YOURLS plugin that restricts administrative access based on Keycloak roles. Only users with the "User" role in Keycloak are allowed to access the YOURLS admin interface. Only users with the "Admin" role in Keycloak are allowed to manage plugins in the YOURLS admin interface.

Features

Requirements

Installation

  1. Download or clone this repository to your YOURLS plugins directory:

  2. Activate the plugin through the YOURLS admin interface or by adding it to your configuration.

Configuration

The plugin uses the following constants that can be customized:

To change the required role, modify this constants in your config.php:

How It Works

  1. Token Validation: The plugin checks for the presence of oidc_id_token in the user's session
  2. JWT Decoding: Decodes the JWT payload to extract user roles
  3. Role Verification: Checks if the user has the required role in resource_access.yourls.roles
  4. Access Control: Blocks access to plugins.php and removes plugin menu items for unauthorized users

Debugging

Enable YOURLS debug mode to see detailed token and role information:

This will display:

Security Features

Keycloak Configuration

Ensure your Keycloak client is configured to:

  1. Include the "yourls" resource in the access token
  2. Assign appropriate roles to users under the "yourls" client scope
  3. Configure OIDC authentication for your YOURLS instance

Error Handling

The plugin gracefully handles:

License

This project is licensed under the MIT License - see the LICENSE file for full license text.

Support

For issues, feature requests, or contributions, please visit the GitHub repository.


All versions of keycloak_roles_yourls with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
julabo/keycloak_yourls Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package julabo/keycloak_roles_yourls contains the following files

Loading the files please wait ...