Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Private file token

Security covered Maintenance fixes only 343 sites

This module allows private files and images to be accessed by appending a time-limited authentication token to their URLs. This is particularly useful for decoupled sites that don't use cookies for authentication, as it provides a secure way to grant temporary access to private content.

Provides access to private files and images by injecting authentication token with a timestamp into their urls. Such a token will be validated when such url is accessed and in case of successful validation the access will be granted. Token is valid for certain period of time.

The intended use case is for decoupled sites which relies on non-cookie authentication. For example when the site uses JWT header authentication. Without a cookie the private files or images cannot be accessed because no form of authentication has been provided (the cookie is missing). This module solves this problem by introducing authentication via token, which is valid for a configurable amount of time.

Example of a private image url containing authentication token and timestamp:

https://example.site/system/files/styles/thumbnail/private/resume/photo/profile_image.png?token=rEezZ9fNlupFtiWb98lJlwct4jFz96987uJovl_c_Zs&timestamp=1605024462&itok=NxuIebsw

Token will be validated along with the timestamp and the path part of the image url. Parameter itok still exists in the url as it is required by Drupal to actually generate image style of the image.

Drupal 9–11

Ask your assistant about Private file token

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Sep 2023
Latest release
4 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
1.0.1 Stable 9–11 Jun 24, 2026
1.0.0 Stable 9–10 Sep 26, 2023