PHPackages                             akaunting/signed-url - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. akaunting/signed-url

Abandoned → [linkeys/signed-url](/?search=linkeys%2Fsigned-url)Library[Security](/categories/security)

akaunting/signed-url
====================

Signed (unique) URL package for Laravel.

1.0.0(7y ago)1014.0k12MITPHPPHP &gt;=5.6.0

Since Oct 15Pushed 6y ago3 watchersCompare

[ Source](https://github.com/akaunting/signed-url)[ Packagist](https://packagist.org/packages/akaunting/signed-url)[ RSS](/packages/akaunting-signed-url/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Signed (unique) URL package for Laravel.
========================================

[](#signed-unique-url-package-for-laravel)

[![Version](https://camo.githubusercontent.com/d2934137a516405d8401ffc9ca532a40800191ae776e4c9cd3e193bcbf7e90e1/68747470733a2f2f706f7365722e707567782e6f72672f616b61756e74696e672f7369676e65642d75726c2f762f737461626c652e737667)](https://github.com/akaunting/signed-url/releases)[![StyleCI](https://camo.githubusercontent.com/e0c029c78135042c54ad27fcba5455cb427e1b166e03d15ac542418e4d75eaf1/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130323239303234392f736869656c643f7374796c653d666c6174266272616e63683d6d6173746572)](https://styleci.io/repos/102290249)[![Downloads](https://camo.githubusercontent.com/0c5eaaef016e175b522e20d7f1617c1088dd3c4924a83711766c3ec21e0b1190/68747470733a2f2f706f7365722e707567782e6f72672f616b61756e74696e672f7369676e65642d75726c2f642f746f74616c2e737667)](https://github.com/akaunting/signed-url)[![License](https://camo.githubusercontent.com/7b271046bd7ab74f1ccd62fcd4921deab11dd6870e69bdbf2d277ff4814431b7/68747470733a2f2f706f7365722e707567782e6f72672f616b61756e74696e672f7369676e65642d75726c2f6c6963656e73652e737667)](LICENSE.md)

This package can create URLs with a limited lifetime. This is done by adding an expiration date and a signature to the URL.

This is how you can create signed URL that's valid for 30 days:

```
SignedUrl::sign('https://myapp.com/protected-route', 30);
```

The output will look like this:

```
https://app.com/protected-route?expires=xxxxxx&signature=xxxxxx

```

The URL can be validated with the `validate`-function.

```
SignedUrl::validate('https://app.com/protected-route?expires=xxxxxx&signature=xxxxxx');
```

The package also provides [a middleware to protect routes](https://github.com/akaunting/signed-url#protecting-routes-with-middleware).

Installation
------------

[](#installation)

As you would have guessed the package can be installed via Composer:

```
composer require akaunting/signed-url

```

This package intends to provide tools for formatting and conversion monetary values in an easy, yet powerful way for Laravel projects. In older versions of the framework, just add the serviceprovider, and optionally register the facade:

```
// config/app.php

'providers' => [
    ...
    Akaunting\SignedUrl\Provider::class,
];

'aliases' => [
    ...
    'SignedUrl' => Akaunting\SignedUrl\Facade::class,
];
```

Configuration
-------------

[](#configuration)

The configuration file can optionally be published via:

```
php artisan vendor:publish --provider=signed-url

```

This is the content of the file:

```
return [

    /*
    * This string is used the to generate a signature. You should
    * keep this value secret.
    */
    'signatureKey' => env('APP_KEY'),

    /*
     * The default expiration time of a URL in days.
     */
    'default_expiration_time_in_days' => 1,

    /*
     * These strings are used a parameter names in a signed url.
     */
    'parameters' => [
        'expires' => 'expires',
        'signature' => 'signature',
    ],

    /*
    |--------------------------------------------------------------------------
    | Middleware
    |--------------------------------------------------------------------------
    |
    | This option indicates the middleware to change language.
    |
    */
    'middleware'    => 'Akaunting\SignedUrl\Middleware\ValidateSignedUrl',

];
```

Usage
-----

[](#usage)

### Signing URLs

[](#signing-urls)

URL's can be signed with the `sign`-method:

```
SignedUrl::sign('https://myapp.com/protected-route');
```

By default the lifetime of an URL is one day. This value can be change in the config-file. If you want a custom life time, you can specify the number of days the URL should be valid:

```
//the generated URL will be valid for 5 days.
SignedUrl::sign('https://myapp.com/protected-route', 5);
```

For fine grained control, you may also pass a `DateTime` instance as the second parameter. The url will be valid up to that moment. This example uses Carbon for convenience:

```
//This URL will be valid up until 2 hours from the moment it was generated.
SignedUrl::sign('https://myapp.com/protected-route', Carbon\Carbon::now()->addHours(2) );
```

### Validating URLs

[](#validating-urls)

To validate a signed URL, simply call the `validate()`-method. This return a boolean.

```
SignedUrl::validate('https://app.com/protected-route?expires=xxxxxx&signature=xxxxxx');
```

### Protecting routes with middleware

[](#protecting-routes-with-middleware)

The package also provides a middleware to protect routes:

```
Route::get('protected-route', ['middleware' => 'signed', function () {
    return 'Hello secret world!';
}]);
```

Your app will abort with a 403 status code if the route is called without a valid signature.

Changelog
---------

[](#changelog)

Please see [Releases](../../releases) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Cüneyt Şentürk](https://github.com/cuneytsenturk)
- [Sebastian De Deyne](https://github.com/sebastiandedeyne)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2818d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5254835?v=4)[Denis Dulici](/maintainers/denisdulici)[@denisdulici](https://github.com/denisdulici)

![](https://avatars.githubusercontent.com/u/10936547?v=4)[Cüneyt Şentürk](/maintainers/cuneytsenturk)[@cuneytsenturk](https://github.com/cuneytsenturk)

---

Top Contributors

[![cuneytsenturk](https://avatars.githubusercontent.com/u/10936547?v=4)](https://github.com/cuneytsenturk "cuneytsenturk (8 commits)")[![denisdulici](https://avatars.githubusercontent.com/u/5254835?v=4)](https://github.com/denisdulici "denisdulici (2 commits)")

---

Tags

laravelphpsecuritysigneduniqueurlurllaraveluniquesignedunique linkunique url

### Embed Badge

![Health badge](/badges/akaunting-signed-url/health.svg)

```
[![Health](https://phpackages.com/badges/akaunting-signed-url/health.svg)](https://phpackages.com/packages/akaunting-signed-url)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[spatie/laravel-csp

Add CSP headers to the responses of a Laravel app

86611.1M25](/packages/spatie-laravel-csp)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[api-platform/laravel

API Platform support for Laravel

58171.4k14](/packages/api-platform-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
