michalsn / codeigniter-signed-url
Signing URL functionality for CodeIgniter 4 framework
Installs: 2 945
Dependents: 0
Suggesters: 0
Security: 0
Stars: 19
Watchers: 6
Forks: 4
Open Issues: 3
Requires
- php: ^8.0
Requires (Dev)
- codeigniter4/devkit: ^1.0
- codeigniter4/framework: ^4.4
- rector/rector: 0.18.5
This package is auto-updated.
Last update: 2024-12-22 12:00:15 UTC
README
Prevent manual URL manipulation and auto expiry URLs.
Installation
composer require michalsn/codeigniter-signed-url
Overview
We can sign URLs very easy with two main methods that act similar to the helper functions known from CodeIgniter's URL helper.
echo signedurl()->siteUrl('controller/method?query=string'); // https://example.com/controller/method?query=string&signature=signature-goes-here
echo signedurl()->setExpiration(DAY * 2)->urlTo('namedRoute', 12); // https://example.com/route/name/12?expiration=1671980371&signature=signature-goes-here
Versions
Versions are not compatible - URLs generated in one version of Signed URL will not work with another version.