Download the PHP package mosip/php-auth-sdk without Composer
On this page you can find all versions of the php package mosip/php-auth-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mosip/php-auth-sdk
More information about mosip/php-auth-sdk
Files in mosip/php-auth-sdk
Package php-auth-sdk
Short Description PHP SDK for MOSIP Authentication
License MPL-2.0
Informations about the package php-auth-sdk
MOSIP Authentication SDK for PHP
PHP SDK for MOSIP (Modular Open Source Identity Platform) Authentication Service. This library provides a simple interface to interact with MOSIP's authentication APIs, enabling demographic authentication, KYC verification, and OTP generation.
Features
- Demographic Authentication - Authenticate individuals using demographic data (name, DOB, gender, etc.)
- KYC Authentication - Know Your Customer verification with demographic and biometric data
- OTP Generation - Generate OTP via email or phone
- Response Decryption - Automatically decrypt and parse API responses
- JWS Signing - Secure request signing using RS256
- Encryption - RSA/OAEP and AES-256-GCM encryption support
Requirements
- PHP >= 7.4
- OpenSSL extension
- JSON extension
- cURL extension
Installation
Install via Composer (Recommended)
The package is available on Packagist:
Manual Installation
-
Clone this repository:
- Install dependencies:
Configuration
Create a config.php file in the root directory:
Place your certificate files in the keys/ directory:
ida.pem- IDA certificate for encryptionpa.p12- Partner certificate for signing and decryption
Usage
Basic Authentication (KYC)
OTP Generation
Authentication with OTP
API Reference
MOSIPAuthenticator
__construct($config, $logger = null)
Initialize the authenticator with configuration.
auth($individualId, $individualIdType, $demographicData = null, $otpValue = '', $biometrics = [], $consent = false, $txnId = '')
Perform demographic authentication.
kyc($individualId, $individualIdType, $demographicData = null, $otpValue = '', $biometrics = [], $consent = false, $txnId = '')
Perform KYC authentication.
genotp($individualId, $individualIdType, $txnId = '', $email = false, $phone = false)
Generate OTP via email or phone.
decryptResponse($responseBody)
Decrypt and parse the API response.
Models
DemographicsModel
Represents demographic data for authentication:
name- Array of IdentityInfodob- Date of birth (format: YYYY/MM/DD)gender- Array of IdentityInfophoneNumber- Phone numberemailId- Email addressaddressLine1,addressLine2,addressLine3- Address lineslocation1,location2,location3- Location informationpostalCode- Postal codefullAddress- Full address
IdentityInfo
Represents language-value pairs:
language- Language code (e.g., 'eng', 'ara')value- The actual value
License
Mozilla Public License Version 2.0
Author
Abdul Bathish
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
All versions of php-auth-sdk with dependencies
ext-openssl Version *
ext-json Version *
ext-curl Version *
guzzlehttp/guzzle Version ^7.0
phpseclib/phpseclib Version ^3.0