waiyanhein / lumen-signed-url by Wai Yan Hein

Package to generate temporary signd URL for Lumen framework
4,843
1
2
Package Data
Maintainer Username: Wai Yan Hein
Maintainer Contact: iljimae.ic@gmail.com (Wai Yan Hein)
Package Create Date: 2021-01-15
Package Last Update: 2021-01-19
Language: PHP
License: Unknown
Last Refreshed: 2025-01-31 03:06:20
Package Statistics
Total Downloads: 4,843
Monthly Downloads: 52
Daily Downloads: 2
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Package to generate signed url for Lumen framework

This package use Laravel file storage system to save the signed URLs, https://laravel.com/docs/8.x/filesystem.

Installation

composer require waiyanhein/lumen-signed-url

Generating temporary Signed URL
$signedUrl = URLSigner::sign("http://testing.com", Carbon::now()->addMinutes(10)->format('Y-m-d H:i:s'));
  • Note: the date must be in Y-m-d H:i:s format.
Signing URL with parameters

If your URL has parameters you can pass them as the third parameter as array.

$signedUrl = URLSigner::sign("http://testing.com", Carbon::now()->addMinutes(10)->format('Y-m-d H:i:s'), [ 'first_name' = 'Wai', 'last_name' => 'Hein' ]);
Validating the Signed URL
$isValid = URLSigner::validate($signedUrl);