Download the PHP package zepekegno/obfuscate-id-bundle without Composer

On this page you can find all versions of the php package zepekegno/obfuscate-id-bundle. 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 obfuscate-id-bundle

Zepekegno ObfuscateBundle Documentation

1. Introduction

The Zepekegno ObfuscateBundle provides the ability to obfuscate and deobfuscate IDs in your Symfony application. It supports obfuscating IDs in both URLs and Twig templates, and it allows you to use Symfony Attributes to automatically resolve obfuscated IDs to actual entities in your controllers.

2. Installation

Step 1 : Install the bundle via Composer

You can install the bundle using Composer by running:

Step 2 : Register the bundle

Symfony 7 should automatically register the bundle, but if it doesn’t, manually add it to your :

Step 3 : Configure the secret key

In your file, add a secret key that will be used to obfuscate and deobfuscate IDs:

This key will be used in the obfuscation algorithm. The secret key must be 32 bytes long for AES-256 encryption

3. Usage with Symfony Attributes

Using in a controller The bundle provides a custom attribute that you can use to automatically resolve obfuscated IDs in your controller methods.

Below are examples of how to use this attribute in different scenarios.

Example 1: Basic ID Obfuscation

In this example, the ObfuscateId attribute is used with the id route parameter, which is obfuscated in the URL and resolved to the Post entity in the controller.

``

Explanation:

Example 2: Custom Route Parameter

In this example, the ObfuscateId attribute specifies a custom route parameter, post, instead of the default id. ``

Explanation:

Explanation

Explanation

4. Usage in Twig Templates

In addition to using obfuscated IDs in routes, you can also obfuscate IDs in Twig templates using the provided filters.

Available Twig Filters

Generating URLs with Obfuscated IDs

To generate a URL that contains an obfuscated ID:

In this example, post.id|offusquer will obfuscate the post’s ID and pass it into the id parameter of the path() function.

6. Customization

You can customize the obfuscation algorithm by using your owner obfuscate service. Here how you can customize the obfuscation algorithm

7. Conclusion

The Zepekegno ObfuscateBundle simplifies the process of hiding sensitive IDs in URLs using obfuscation techniques. It integrates seamlessly with Symfony’s routing system and Twig templating engine, allowing you to easily obfuscate and deobfuscate IDs both in the backend and frontend. With support for Symfony Attributes, you can resolve obfuscated IDs into entities directly in your controller methods, making your code cleaner and more secure.


All versions of obfuscate-id-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
symfony/framework-bundle Version ^6.0 || ^7.0
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 zepekegno/obfuscate-id-bundle contains the following files

Loading the files please wait ....