Search by

kakaprodo / presigned-action

kakaprodo

A Laravel package for securely presigning actions on any entity, enabling controlled access and authorization without requiring users to share their passwords.

Package info

github.com/kakaprodo/presigned-action

pkg:composer/kakaprodo/presigned-action

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-09-07 17:04 UTC

This package is auto-updated.

Last update: 2026-09-07 17:34:56 UTC


README

A Laravel package for securely presigning actions on any entity, enabling controlled access and authorization without requiring users to share their passwords.

use Kakaprodo\PresignedAction\Facades\PresignedAction;

$accessKey = PresignedAction::generateAccessKey([
	'accessible' => $order,
	'whoami' => 'partner-42',
    'expires_at' => now()->addHour(),
	'scopes' => ['orders.read', 'orders.download'],
	'settings' => [
		'source' => 'partner-api',
	],
]);

return response()->json($accessKey->formatPublicTempKey());

And here is the output

{
    "temp_access_key": "eyJpdiI6IndsK3FUUmtQN.....0MzZkZiIsInRhZyI6IiJ9",
    "expires_at": 1789009228
}

Why Presigned Action?

In a microservice architecture, a user may be authenticated and authorized by a Core service while the entity she/he needs to access belongs to another service.

For example, a user in a Core service may be authorized to perform an action on a Shop managed by another service. The user should be able to perform that action without having a user account in the Shop service.

Presigned Action provides a way to authorize this cross-service access without duplicating users, roles, or permissions across services.

Official Doc On Yupidoc