templates | ||
.gitignore | ||
LICENSE | ||
main.py | ||
README.md |
UniAuth
UniAuth is a single sign-on application designed to provide a secure and efficient method for managing user authentication. The application is built using Flask, a popular web framework in Python, and offers a straightforward implementation suitable for integrating into various web services.
Features
- Token-Based Authentication: Generates and verifies secure authentication tokens.
- Login Required Decorator: Enhances routes to require user authentication.
- User Authentication: Validates username and password against stored credentials.
- Secure Cookie Handling: Sets authentication tokens in cookies with security best practices.
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Prerequisites
- Python 3
- Flask
- Werkzeug
- ItsDangerous
Installing
- Clone the repository:
git clone https://git.4angle.com/edward/UniAuth
- Install the required packages:
pip install flask werkzeug itsdangerous
- Set up the configuration in
config/default.py
.
Running the Application
Run the application using:
python main.py
The application should now be running on http://0.0.0.0:5000/
.
Usage
- Login: Users can log in by providing their username and password.
- Token Generation: Upon successful login, a secure token is generated and stored in a cookie.
- Access Protected Routes: Only authenticated users can access protected routes.
Contributing
Contributions are welcome. If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with descriptive messages.
- Push your changes to your fork.
- Create a pull request to the main repository's
main
branch.
License
This project is licensed under the MIT License. Feel free to use, modify, and distribute it as per the license terms. See the LICENSE file for details.
Acknowledgments
- Flask team for the great web framework
- ItsDangerous for secure token generation
This README provides a basic overview and guide for your application. You can further customize it to include more detailed documentation as needed.