Releases: fcsapi/token-generator
Releases · fcsapi/token-generator
4.0.0
FCS API Token Generator v4.0.0
First Release - Secure token generator for FCS API frontend authentication in 10 programming languages.
What's New
Initial release with complete token generation implementation:
- 10 Programming Languages - PHP, Python, JavaScript, Java, Ruby, C#, Go, Rust, Swift, Kotlin
- HMAC-SHA256 Encryption - Industry-standard secure token generation
- Time-Limited Tokens - Configurable expiry (5 min to 24 hours)
- Zero Dependencies - Pure implementations using native crypto libraries
- Frontend Security - No API key exposure in client-side code
- Simple Integration - Single file per language, easy to use
Supported Languages
- PHP (7.4+)
- Python (3.7+)
- JavaScript (Node.js 12+)
- Java (8+)
- Ruby (2.5+)
- C# (.NET 6.0+)
- Go (1.16+)
- Rust (1.50+)
- Swift (5.0+)
- Kotlin (1.5+)
Installation
Clone repository:
git clone https://github.com/fcsapi/token-generatorOr download single file:
curl -O https://raw.githubusercontent.com/fcsapi/token-generator/main/token-generator.php
curl -O https://raw.githubusercontent.com/fcsapi/token-generator/main/token-generator.py
# ... etcQuick Start
PHP:
$generator = new FcsTokenGenerator('access_key', 'public_key');
$tokenData = $generator->generateToken();Python:
generator = FcsTokenGenerator('access_key', 'public_key')
token_data = generator.generate_token()JavaScript:
const generator = new FcsTokenGenerator('access_key', 'public_key');
const tokenData = generator.generateToken();Token Expiry Options
- 300 seconds (5 minutes)
- 900 seconds (15 minutes)
- 1800 seconds (30 minutes)
- 3600 seconds (1 hour - default)
- 86400 seconds (24 hours)
Use Case
Generate secure tokens on backend (PHP, Python, etc.) → Send to frontend → Frontend uses token for FCS API calls (no API key exposed in browser).
Requirements
- Backend server (any of the 10 supported languages)
- FCS API Access Key and Public Key
Documentation
- Token authentication guide: https://fcsapi.com/document
- Get API keys: https://fcsapi.com/dashboard
- Support: support@fcsapi.com
License
MIT License