Download the PHP package jodeveloper/secure-share without Composer

On this page you can find all versions of the php package jodeveloper/secure-share. 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 secure-share

jodeveloper/secure-share

Passcode-encrypted secret + attachment sharing for Laravel + Filament.

Any host app installs the package, runs the migration, registers the Filament plugin, and gets a working share-via-link feature — reusing whatever Spatie Media Library disk (OSS, S3, local) the host already has configured.

Requirements

Installation

The service provider is registered through Composer package discovery. Publish the migrations again when upgrading to a release that adds one, then run php artisan migrate before using the new behavior.

After upgrading from a release with the older unlock-session format, recipients must unlock shares again. Run the published migration before serving requests.

Register the plugin once in your panel provider:

That's it. Your panel gets a Secure shares page, and the public /secure-share/{token} routes go live.

How it works

  1. An authenticated panel user writes the secret text (and/or attaches files) plus a passcode on the Create secure share page.
  2. The body and every attachment are encrypted with a key derived from the passcode via sodium_crypto_pwhash (Argon2id) + sodium_crypto_secretbox. The raw passcode is never written to the database, logs, or client; a successful unlock stores an encrypted copy in the server-side session grant.
  3. Attachment ciphertext is stored through Media Library in the secure-attachments collection on config('secure-share.disk') (null = Media Library's default disk, e.g. your OSS disk).
  4. The recipient opens /secure-share/{token}, enters the passcode, and gets the decrypted text plus download links. Downloads stream decrypted bytes and never write plaintext to disk.
  5. Optional limits: expiry (30 min – 30 days / never), max views, and burn-after-reading. A burned share rejects later unlocks immediately; its attachment download grant remains available for the configured short window and cleanup runs afterward.

Scheduling

The package auto-schedules secure-share:purge hourly. The command:

If you prefer your own schedule, set 'purge' => ['schedule' => false] and register it yourself, e.g. Schedule::command('secure-share:purge')->hourly();. Either way your scheduler must be running (schedule:work / cron entry).

Configuration

Published at config/secure-share.php:

Key Default Meaning
model SecureShare::class Swap/extend the Eloquent model
disk null Attachment disk; null = Media Library default
route.prefix secure-share Public URL prefix
route.middleware ['web'] Route middleware (includes CSRF)
passcode.min_length 8 Minimum passcode length
lockout.max_attempts 5 Wrong passcodes before lockout
lockout.lockout_minutes 15 Lockout duration
throttle '6,1' requests,minutes on unlock + download, keyed by token and IP
unlock_ttl 600 Seconds a successful unlock keeps downloads working
max_upload_kb 10240 Max size per attachment enforced by the create action and Filament UI
purge.schedule true Auto-schedule the hourly purge
purge.retention_days 7 How long expired/exhausted ciphertext waits before cleanup is eligible

Views & translations

The public page and the Filament page are namespaced (secure-share::) and publishable — override styling per host app:

Translations ship in English and Arabic; the public page mirrors correctly in RTL locales (logical CSS properties) and degrades gracefully without JavaScript. Add locales by publishing translations.

Reusable Filament action

Use the native Filament action anywhere a host resolves its source files. The attachment resolver is trusted server-side code; it receives validated action data and the current record. Each descriptor must provide a configured disk, path, and download name, with an optional MIME type:

When the resolver supplies the content, add host selectors and reuse the package controls without the text/upload inputs:

The action uses the active Filament guard for created_by, validates the passcode and limits, and shows a persistent notification containing the URL. The descriptor path is read from the configured disk by trusted server-side code; do not accept paths or URLs from request data.

Security model

What is protected

Known trade-offs (read before deploying)

  1. Unlock grant trust boundary. Crypt::encryptString() uses the application's APP_KEY to wrap the passcode inside a server-side session grant. The grant TTL authorizes downloads for unlock_ttl seconds (default 10 minutes), while the encrypted value can remain dormant until the session expires or it is cleared. Protect APP_KEY and the session store as carefully as the database; the raw passcode is never returned to the browser.
  2. Livewire temp-upload staging. While an admin picks files in the Filament form, Livewire stages the plaintext upload on its temporary disk before the form is submitted and the bytes are encrypted. This is inherent to Livewire uploads; files are removed with the temp cleanup.
  3. Attachment metadata is cleartext. Original filenames, MIME types, and sizes live unencrypted in the media table (custom_properties) so downloads can restore them. If filenames are sensitive in your threat model, rename files before attaching.
  4. Creation cap vs download memory. Creation reads are capped by max_upload_kb before encryption. Downloads currently decrypt the whole attachment in memory, so large permitted files increase peak memory; use a dedicated streaming storage service if that becomes material.
  5. Atomic limits. Unlock limits are serialized per share so max views and lockout counters cannot be consumed twice by the same row. Production concurrency on every supported database and storage driver still requires deployment-environment verification.

  6. Soft-delete retention. Cleanup erases ciphertext and encrypted media through the model's erase() path while soft-deleted metadata remains available for audit and retry. Configure database metadata retention and object-storage lifecycle policies together.

Testing

The suite covers the cipher (roundtrip, tamper, wrong passcode), create and unlock actions (lockout, expiry, burn, exhaustion), the full HTTP flow (reveal, download, isolation, TTL, message parity, passcode-never-persisted), the Filament page, and the purge command.

License

MIT


All versions of secure-share with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-sodium Version *
illuminate/support Version ^11.28 || ^12.0
spatie/laravel-package-tools Version ^1.16
spatie/laravel-medialibrary Version ^11.0
filament/filament Version ^5.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 jodeveloper/secure-share contains the following files

Loading the files please wait ...