Evrmore Authentication
A secure wallet-based authentication system for Evrmore blockchain applications
📋 Table of Contents
- ✨ Overview
- 🚀 Quick Start
- 🧰 System Requirements
- 🔐 Authentication Flow
- 📘 Usage in Your Application
- ⚙️ Configuration
- 📚 Documentation
- 💻 Development
- 📄 License
- 📞 Contact
✨ Overview
Evrmore Authentication is a Python package that provides wallet-based authentication using Evrmore signature verification. This allows users to authenticate to web applications using their Evrmore wallet without sharing their private keys, creating a secure and user-friendly authentication experience.
Key Features:
- 🔑 Wallet-based authentication - Users sign a challenge message with their Evrmore wallet
- 🔒 JWT token management - Secure session handling with JSON Web Tokens
- 📁 SQLite backend - Simple, file-based database for session and challenge storage
- 👤 Automatic user management - Users are created on first authentication
- 🌐 Complete API server - Ready-to-use FastAPI server for authentication endpoints
- 🖥️ Demo web interface - Example Flask application showing the complete authentication flow
🚀 Quick Start
Installation
pip3 install evrmore-authentication
Running the API Server
python3 -m scripts.run_api_server --host 0.0.0.0 --port 8000
Running the Web Demo
python3 -m scripts.run_web_demo --port 5000 --api-url http://localhost:8000
🧰 System Requirements
- Python 3.7 or higher
- SQLite database for session and challenge storage
- Evrmore node (for signature verification)
🔐 Authentication Flow
| 1. Challenge Generation | The server generates a unique challenge for the user's Evrmore address |
| 2. Signature Creation | The user signs the challenge with their Evrmore wallet |
| 3. Verification | The server verifies the signature against the challenge |
| 4. Token Issuance | Upon successful verification, a JWT token is issued |
| 5. Authentication | The token is used for subsequent API requests |
📘 Usage in Your Application
Basic Authentication Flow
from evrmore_authentication import EvrmoreAuth
from evrmore_rpc import EvrmoreClient
# Initialize the authentication system with an Evrmore client
client = EvrmoreClient()
auth = EvrmoreAuth(client)
# Generate a challenge for a user's Evrmore address
challenge = auth.generate_challenge("EXaMPLeEvRMoReAddResS")
# Verify the signature provided by the user
session = auth.authenticate(
evrmore_address="EXaMPLeEvRMoReAddResS",
challenge=challenge,
signature="signed_challenge_from_wallet"
)
# Use the token for authentication
token = session.token
# Validate a token
token_data = auth.validate_token(token)
# Get user from token
user = auth.get_user_by_token(token)
# Invalidate a token (logout)
auth.invalidate_token(token)
FastAPI Integration
The package includes a ready-to-use FastAPI server with the following endpoints:
| Endpoint | Method | Description |
|---|---|---|
/challenge |
POST | Generate a challenge for a user |
/authenticate |
POST | Authenticate with a signed challenge |
/validate |
GET | Validate a JWT token |
/me |
GET | Get authenticated user information |
/logout |
POST | Invalidate a JWT token (logout) |
⚙️ Configuration
Configuration is done through environment variables or a .env file:
# SQLite configuration
SQLITE_DB_PATH=./data/evrmore_auth.db
# JWT configuration
JWT_SECRET=your-secure-secret-key
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=30
# Challenge configuration
CHALLENGE_EXPIRE_MINUTES=10
📚 Documentation
For more information, please see:
💻 Development
Project Structure
evrmore-authentication/
├── evrmore_authentication/ # Main package
│ ├── __init__.py # Package initialization
│ ├── auth.py # Core authentication logic
│ ├── api.py # FastAPI endpoints
│ ├── models.py # Database models
│ ├── exceptions.py # Custom exceptions
│ └── dependencies.py # FastAPI dependencies
├── scripts/ # Utility scripts
│ ├── run_api_server.py # API server runner
│ └── run_web_demo.py # Web demo runner
├── examples/ # Example applications
│ ├── demo.py # Simple CLI demo
│ └── web_auth_demo/ # Web application example
├── tests/ # Test suite
├── docs/ # Documentation
└── setup.py # Package setup
Setup Development Environment
git clone https://github.com/manticoretechnologies/evrmore-authentication.git
cd evrmore-authentication
pip3 install -e .
Running Tests
pytest
Building Documentation Locally
# Install MkDocs and the Material theme
pip3 install mkdocs-material
# Serve the documentation locally at http://127.0.0.1:8000
mkdocs serve
# Build the documentation
mkdocs build
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
📞 Contact
| 🏢 Organization | Manticore Technologies |
| 🌐 Website | manticore.technology |
| 📂 GitHub | github.com/manticoretechnologies |
| dev@manticore.technology |
Built with ❤️ by Manticore Technologies
Metadata
Release files for evrmore-authentication 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| evrmore_authentication-0.3.0.tar.gz | 27.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| evrmore_authentication-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.5 kB
Release files / evrmore_authentication-0.3.0.tar.gz
| Download URL | evrmore_authentication-0.3.0.tar.gz |
|---|---|
| Size | 27.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
353cafe2130fdfad2b54df60601a9090102571277e621b241522917dce916684
|
|
BLAKE2b-256 checksum How to use checksums |
db9bb0994bab7c3c8347379313923aa5fb20800788e858a01d3bf379659218d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / evrmore_authentication-0.3.0-py3-none-any.whl
| Download URL | evrmore_authentication-0.3.0-py3-none-any.whl |
|---|---|
| Size | 27.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8216b0ca6e2174ab634e03e35c1ae518504d486af5ef66ca07f74555137aa95a
|
|
BLAKE2b-256 checksum How to use checksums |
dddfbbcc80e2e6c605bb9fa31690afc8ccb326e9c3e5e0562d07b8eef2a27567
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|