Download the PHP package edunext-eu/simplesamlphp-module-simpletotp without Composer

On this page you can find all versions of the php package edunext-eu/simplesamlphp-module-simpletotp. 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 simplesamlphp-module-simpletotp

SimpleTOTP

A SimpleSAMLphp auth processing filter that adds TOTP-based MFA on an IdP or SP. Recommended placement is the IdP to keep TOTP secrets off SPs. Only HMAC-SHA1 TOTP is supported for maximum compatibility with authenticator apps. Current release: 2.1. See UPGRADING.md when updating from 2.0.

Key features

Installation

Via Git

Clone into the SimpleSAMLphp modules/ directory.

Via Composer

Install the module from Packagist:

Quick start (IdP recommended)

Add the filter to authproc.idp after the authentication source supplies the seed and before filters that rename identifiers. For example, when core:AttributeMap runs at priority 35:

validation_timeout is intentionally omitted above: its default is 60 minutes. It caches the fact that MFA succeeded for the same SimpleSAMLphp session, authentication context, identity, and TOTP seed. It does not extend the validity of a six-digit TOTP code.

For a Redis-backed deployment, use the following values in the filter:

TOTP secret handling

secret_attr is the long-lived Base32 seed (for example, ga_secret), not the six-digit code entered by the user. Version 2.1 removes that attribute as soon as the simpletotp:mfa filter runs, including cached, optional-MFA, and error paths. When a prompt is required, the seed exists only in saved server-side authentication state and is removed before the authproc chain resumes.

With the recommended IdP-side placement:

Place this filter after the authentication source has supplied the seed but before filters such as core:AttributeMap that rename the user identifier used for rate limiting. Filters that run later cannot read secret_attr.

Module enablement

Enable the module via config.php by setting:

This is preferred over the legacy modules/<name>/enable file because it is explicit and visible in configuration management.

SP-side verification (legacy; not recommended)

SP-side verification remains possible. In that deployment model:

  1. Do not run simpletotp:mfa at the IdP. If the IdP filter runs, it removes the seed before producing the SAML assertion.
  2. Configure the IdP to release the seed attribute only to the specific, trusted SP that needs it.
  3. Run the filter in that SP's authproc.sp chain:

The SP-side filter consumes and removes the seed before the SP's downstream processing or application receives the attributes. This mode therefore still works, but the seed crosses the federation boundary and every receiving SP becomes responsible for protecting it.

Never send the user's six-digit TOTP code to an SP. If the SP only needs to know that MFA occurred, communicate an authentication-assurance result (for example, an agreed SAML AuthnContext or assertion attribute) rather than the seed or code. SimpleTOTP does not currently create that assurance signal.

Configuration notes

Security notes

Translations

All user-facing strings are translatable via gettext. Add or edit translations in locales/<lang>/LC_MESSAGES/simpletotp.po (e.g. locales/it/LC_MESSAGES/simpletotp.po or locales/es/LC_MESSAGES/simpletotp.po). SimpleSAMLphp selects the language based on the user's locale settings. Translations are best-effort and may need review by native speakers; some locales may still use English strings. Pull requests or issues to refine wording are welcome.

Fork notice

This repository is maintained at https://github.com/edunext-eu/SimpleTOTP and is a fork of the original module. If you are upgrading from the original, update your Composer package name to edunext-eu/simplesamlphp-module-simpletotp. Third-party TOTP primitive notices are retained in THIRD_PARTY_NOTICES.md.

Changes in this fork

Maintenance

Long-term maintenance for this module is not guaranteed. If you want to take stewardship, open an issue.

Testing

Run composer test, or execute the four PHP scripts under tests/ directly. The suite covers RFC vectors, strict Base32 parsing, parallel rate limiting, replay rejection, credential-bound MFA caching, state consumption, and restart CSRF/cookie behavior.

Disclaimer

This software is provided "as is" without warranty of any kind; use at your own risk.


All versions of simplesamlphp-module-simpletotp with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-ctype Version *
ext-hash Version *
ext-json Version *
simplesamlphp/composer-module-installer Version ~1.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 edunext-eu/simplesamlphp-module-simpletotp contains the following files

Loading the files please wait ...