PHPackages                             tvdijen/simplesamlphp-module-cmdotcom - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. tvdijen/simplesamlphp-module-cmdotcom

AbandonedArchivedSimplesamlphp-module[Authentication &amp; Authorization](/categories/authentication)

tvdijen/simplesamlphp-module-cmdotcom
=====================================

SMS as Second Factor module

v1.4.1(3y ago)0447LGPL-2.1-or-laterPHPPHP ^8.0

Since Feb 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/tvdijen/simplesamlphp-module-cmdotcom)[ Packagist](https://packagist.org/packages/tvdijen/simplesamlphp-module-cmdotcom)[ RSS](/packages/tvdijen-simplesamlphp-module-cmdotcom/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (6)Versions (16)Used By (0)

SMS as Second Factor module
===========================

[](#sms-as-second-factor-module)

[![Build Status](https://github.com/tvdijen/simplesamlphp-module-cmdotcom/actions/workflows/php.yml/badge.svg)](https://github.com/tvdijen/simplesamlphp-module-cmdotcom/actions/workflows/php.yml/badge.svg)[![Coverage Status](https://camo.githubusercontent.com/fa9ceb086afd91df4462b709890e56d846402bc93cd8db9575ccbb5bda188ffe/68747470733a2f2f636f6465636f762e696f2f67682f747664696a656e2f73696d706c6573616d6c7068702d6d6f64756c652d636d646f74636f6d2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/tvdijen/simplesamlphp-module-cmdotcom)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e4e85a9dcaed0305118d4f1d6077b4c586c6ed00b316ca4e82b1af9c8133fbbb/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f747664696a656e2f73696d706c6573616d6c7068702d6d6f64756c652d636d646f74636f6d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tvdijen/simplesamlphp-module-cmdotcom/?branch=master)[![Type Coverage](https://camo.githubusercontent.com/6b4ba92303ba0b140c01de3020ffd0b73ca81efc69c059e1fdbd65a4f8f42740/68747470733a2f2f73686570686572642e6465762f6769746875622f747664696a656e2f73696d706c6573616d6c7068702d6d6f64756c652d636d646f74636f6d2f636f7665726167652e737667)](https://shepherd.dev/github/tvdijen/simplesamlphp-module-cmdotcom)[![Psalm Level](https://camo.githubusercontent.com/9b29ea3a4bce109e84f4187a53b83945074e249b7cfdc53e83c4ef992870aa0f/68747470733a2f2f73686570686572642e6465762f6769746875622f747664696a656e2f73696d706c6573616d6c7068702d6d6f64756c652d636d646f74636f6d2f6c6576656c2e737667)](https://shepherd.dev/github/tvdijen/simplesamlphp-module-cmdotcom)

Caution

This module has been abandoned since June 13, 2024. It should still work, and I don't mind reviving it, but my personal use-case for this module no longer exists. Feel free to hit me up if you need this module and together we can work things out.

This module is implemented as an Authentication Processing Filter. That means it can be configured in the global config.php file or the SP remote or IdP hosted metadata.

- [Read more about processing filters in SimpleSAMLphp](simplesamlphp-authproc)

Prerequisites
-------------

[](#prerequisites)

To be able to use this module, you have to register at CM.com to get an API-key for their RESTful [API](https://www.cm.com/app/docs/en/one-time-passwords-otp/v1.0/).

How to setup the module
-----------------------

[](#how-to-setup-the-module)

First you need to enable the module; in `config.php`, search for the `module.enable` key and add `cmdotcom` with value `true`:

```
    'module.enable' => [
         'cmdotcom' => true,
         …
    ],
```

In order to process the passcode SMS in this module, you need set the mandatory API-key to interact with the CM.com RESTful API in the `productToken` setting.

You can optionally set the `mobilePhoneAttribute` to the name of the attribute that contains the user's mobile phone number. The default attribute if this setting is left out is `mobile`.

If the attribute defined above is not available for a user, an error message will be shown, and the user will not be allowed through the filter. Please make sure that you select an attribute that is available to all users.

By default the SMS will originate from `Example`, but this can be changed using the optional `originator` setting. The maximum length is 16 digits for a phonenumber or 11 alphanumerical characters \[a-zA-Z0-9\]. Example: 'CMTelecom'.

Another default is that the OTP received by SMS can be entered within a period of three minutes. This can be adjusted by configuring the optional `validFor` setting to the number of seconds the code should be valid.

Finally, it is possible for the OTP code to be automatically pushed to a mobile app. To do this, set the optional `allowPush` to `true` and set the `appKey` to match your mobile app.

This module is using [libphonenumber-for-php](https://github.com/giggsey/libphonenumber-for-php)to parse recipient phonenumbers and normalize them. If you experience undeliverable SMS, you can try to set your `defaultRegion` to the [CLDR](https://www.unicode.org/cldr/cldr-aux/charts/30/supplemental/territory_information.html) two-letter region-code format for your region.

Add the filter to your Identity Provider hosted metadata authproc filters list, specifying the attribute you've selected.

```
    90 => [
        'class' => 'cmdotcom:OTP',
        'productToken' => 'secret',
        'mobilePhoneAttribute' => 'mobile',
        'originator' => 'CM Telecom',
        'validFor' => 600,
        'defaultRegion' => 'NL',
    ],
```

This setup uses no persistent storage at all. This means that the user will always be asked to enter a passcode each time she logs in.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 98.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~30 days

Recently: every ~85 days

Total

13

Last Release

1181d ago

PHP version history (2 changes)v1.1.0PHP &gt;=7.4 || ^8.0

v1.4.1PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/d424231c85138609ae230ccd5002c8025fd5dce7f51b2f1778f69ba3a49a4efa?d=identicon)[tvdijen](/maintainers/tvdijen)

---

Top Contributors

[![tvdijen](https://avatars.githubusercontent.com/u/841045?v=4)](https://github.com/tvdijen "tvdijen (155 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")

---

Tags

smssimplesamlphpcm.comcmcmdotcom

### Embed Badge

![Health badge](/badges/tvdijen-simplesamlphp-module-cmdotcom/health.svg)

```
[![Health](https://phpackages.com/badges/tvdijen-simplesamlphp-module-cmdotcom/health.svg)](https://phpackages.com/packages/tvdijen-simplesamlphp-module-cmdotcom)
```

###  Alternatives

[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[drupalauth/simplesamlphp-module-drupalauth

A SimpleSAMLphp module adding support for Drupal as the authentication source.

25305.4k1](/packages/drupalauth-simplesamlphp-module-drupalauth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
