Download the PHP package sudtechnology/sud-gip-auth-php without Composer
On this page you can find all versions of the php package sudtechnology/sud-gip-auth-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sudtechnology/sud-gip-auth-php
More information about sudtechnology/sud-gip-auth-php
Files in sudtechnology/sud-gip-auth-php
Package sud-gip-auth-php
Short Description PHP implementation of Sud GIP authentication system with JWT support
License MIT
Homepage https://github.com/SudTechnology/sud-gip-auth-php
Informations about the package sud-gip-auth-php
Sud GIP Auth PHP SDK
Introduction
The Sud GIP Auth PHP SDK is a PHP library designed for implementing the Sud GIP authentication system, with support for JWT (JSON Web Token) authentication. This SDK provides functions such as generating authentication codes, server-to-server tokens (SSTokens), verifying tokens, and retrieving user IDs, making it convenient for developers to integrate Sud GIP's authentication services into PHP projects.
Features
- Token Generation: Supports generating authentication codes and SSTokens, with the ability to set expiration durations.
- Token Verification: Verifies the validity of authentication codes and SSTokens.
- User ID Retrieval: Retrieves user IDs using authentication codes or SSTokens.
Installation
You can install this SDK using Composer. Run the following command in your project's root directory:
Usage
Initialization
First, you need to instantiate the SudGIPAuth class and pass in your application ID and application secret:
Get Authentication Code
Get Server-to-Server Token (SSToken)
Get User ID by Authentication Code
Get User ID by SSToken
Error Codes
| Error Code | Description |
|---|---|
| 0 | Success |
| 1001 | Token creation failed |
| 1002 | Token verification failed |
| 1003 | Token decoding failed |
| 1004 | Token is invalid |
| 1005 | Token has expired |
| 1101 | App data is invalid |
| 9999 | Unknown error |
License
This project is licensed under the MIT License. See the LICENSE file for details.