PHPackages                             wwpass/apiclient - 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. [API Development](/categories/api)
4. /
5. wwpass/apiclient

ActiveLibrary[API Development](/categories/api)

wwpass/apiclient
================

A PHP implementation of the WWPass API

4.0.2(1y ago)0542Apache-2.0PHPPHP &gt;=7.0

Since Mar 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/wwpass/wwpass-php-sdk)[ Packagist](https://packagist.org/packages/wwpass/apiclient)[ Docs](https://wwpass.com/)[ RSS](/packages/wwpass-apiclient/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

WWPass PHP SDK and API Client Documentation
===========================================

[](#wwpass-php-sdk-and-api-client-documentation)

Version 4.0.2 This repository provides the combined WWPass PHP SDK and Composer-compliant API client library, enabling multifactor authentication for websites and applications. It includes documentation, server library, a standalone script (wwpass.php), and demo examples for easy integration.

Overview
--------

[](#overview)

WWPass is a third-party authentication provider that offers reliable, secure, and convenient multi-factor authentication for websites, as well as mobile and desktop applications. It uses QR-code-based authentication, where users scan a code with the WWPass Key App to log in. Each user is assigned a unique identifier by WWPass, called a PUID (Provider-Specific User Identifier), which ensures consistent identification on the same website while preserving anonymity across different websites.

Repository Structure
--------------------

[](#repository-structure)

demo/: Contains example code demonstrating WWPass authentication. src/: Includes the server library classes to interact with the WWPass API. wwpass.php: A standalone script for implementing WWPass authentication.

Installation
------------

[](#installation)

To install the Composer-compliant API client library:

```
composer require wwpass/apiclient
```

Usage
-----

[](#usage)

The library defines two main classes: **WWPass\\Connection** and **WWPass\\Exception**.

```
require_once 'vendor/autoload.php';

try {
    $wwc = new WWPass\Connection([
        'key_file' => WWPASS_SPFE_KEY_FILE,
        'cert_file' => WWPASS_SPFE_CERT_FILE,
        'ca_file' => WWPASS_SPFE_CA_FILE
    ]);
    $response = $wwc->getTicket(['ttl' => 300, 'pin' => true]);

    $ttl = $response['ttl'];
    $ticket = $response['ticket'];
} catch (WWPass\Exception $e) {
    echo 'Caught WWPass exception: ' . $e->getMessage();
} catch (Exception $e) {
    echo 'Caught exception: ' . $e->getMessage();
}
```

Setup Instructions
------------------

[](#setup-instructions)

> Before following this tutorial, make sure you have installed the WWPass Key App. The application is available for free at [AppStore](https://apps.apple.com/app/wwpass-key/id984532938) and [Google Play](https://play.google.com/store/apps/details?id=com.wwpass.android.passkey).

### Step 1: Register with WWPass

[](#step-1-register-with-wwpass)

> Skip this section if you already have an account on [manage.wwpass.com](https://manage.wwpass.com/)

- Register your site on the [WWPass Developers](https://manage.wwpass.com/).
- Obtain your Service Provider (SP) credentials (certificate and private key), and download the WWPass CA certificate.

### Step 2: Domain Validation

[](#step-2-domain-validation)

- Add your domain in the WWPass portal and verify ownership by placing a unique verification file in your website’s root directory.
- Make sure the file is accessible via a public URL.

### Step 3: Obtain Digital Certificates

[](#step-3-obtain-digital-certificates)

- Use OpenSSL to generate a private key and a certificate signing request (CSR):

```
openssl req -new -newkey rsa:4096 -nodes -subj "/O=example.org" -keyout example.org.key -out example.org.req
```

- Upload the certificate signing request (CSR) to WWPass and download the issued certificate.

### Step 4: Implement QR Code Authentication

[](#step-4-implement-qr-code-authentication)

- Add a QR code placeholder to your HTML

```

```

- Include the WWPass authentication script to generate and display the QR code:

```

  WWPass.authInit({
    qrcode: '#qrcode',
    ticketURL: 'getticket.php',
    callbackURL: 'login.php',
  });

```

- Ensure your server-side code can handle ticket generation and retrieve the user's PUID.

License
-------

[](#license)

This project is licensed under the Apache License, Version 2.0. See the [LICENSE](https://www.apache.org/licenses/LICENSE-2.0) file for details.

Additional Resources
--------------------

[](#additional-resources)

- For more details on implementing WWPass, see the [Documentation](https://docs.wwpass.com/docs/).
- For server library setup, refer to the [Server Library Integration](https://docs.wwpass.com/docs/#step-5-add-server-library).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance47

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 69.2% 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 ~7 days

Total

2

Last Release

396d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8cb815fc08ec6c1e0700a6a1fc07de8bd5d333c16804a766b0c0601ef64a59eb?d=identicon)[wwpass](/maintainers/wwpass)

---

Top Contributors

[![w1aau](https://avatars.githubusercontent.com/u/73990111?v=4)](https://github.com/w1aau "w1aau (9 commits)")[![wwpass](https://avatars.githubusercontent.com/u/6584188?v=4)](https://github.com/wwpass "wwpass (4 commits)")

### Embed Badge

![Health badge](/badges/wwpass-apiclient/health.svg)

```
[![Health](https://phpackages.com/badges/wwpass-apiclient/health.svg)](https://phpackages.com/packages/wwpass-apiclient)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M186](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M451](/packages/google-gax)

PHPackages © 2026

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