Download the PHP package atwx/silverstripe-gate-client without Composer
On this page you can find all versions of the php package atwx/silverstripe-gate-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download atwx/silverstripe-gate-client
More information about atwx/silverstripe-gate-client
Files in atwx/silverstripe-gate-client
Package silverstripe-gate-client
Short Description A Silverstripe module to allow you to log into any of your Silverstripe sites from one place.
License BSD-3-Clause
Informations about the package silverstripe-gate-client
Silverstripe Gate Client
A SilverStripe module that lets you log into a SilverStripe site from a centralized system using signed JWTs and then redirects you into the CMS.
In short: the module validates a signed JSON Web Token (JWT) passed via the URL. On successful validation a configured user (or the default admin) is automatically logged in and redirected to a configured destination URL.
Use the Silverstripe Gate Manager on your admin instance to do so.
Installation
This package is intended to be installed via Composer. From your project root:
Configuration
Configure the module via SilverStripe YAML config. Important options:
Note: the key must be in PEM format. Tokens should be signed by the central system that issues them with the corresponding private key (for example RS256).
You can also use the .env to configure the public key. Make sure to escape newlines using \n:
More advanced configuration:
Sudo Mode
By default, SilverStripe's Sudo Mode is not activated after a JWT login. This means users who access sudo-protected CMS areas (e.g. certain security settings) will be prompted for their password — which is not possible for SSO users.
You can opt in to automatically bypassing sudo mode for JWT-authenticated sessions:
Via .env:
Via YAML:
When enabled, a jwt-authenticated flag is set in the session after a successful JWT login. A SudoModeExtension on SudoModeService detects this flag and marks sudo mode as active for the duration of the session.
Security considerations:
- The feature is opt-in and disabled by default.
- The session flag is only set after JWT signature validation and a successful member login.
- The flag is cleared when the user logs out (session is destroyed).
- Unlike normal sudo mode (which times out after 45 minutes), the bypass is active for the entire session. This is intentional for SSO users who cannot enter a password.
Route / Endpoint
The module registers the route /_silvergateclient (see _config/routes.yml).
Primary endpoint:
- GET
/_silvergateclient/token/<urlencoded_base64_jwt>
Example (as used in the tests):
All versions of silverstripe-gate-client with dependencies
silverstripe/framework Version ^6.0
silverstripe/admin Version ^3.0
firebase/php-jwt Version ^6.11 || ^7.0