Djuix.io Docs

Djuix.io

Authentication in Djuix.io

Overview

Authentication is essential for securing your API endpoints, and Djuix provides a robust system to manage user authentication through JSON Web Tokens (JWT). The authentication system is designed to be both powerful and user-friendly, allowing you to set up secure endpoints with minimal configuration.This documentation outlines how to set up and use the Auth plugin in Djuix to protect your API.

Setting Up Authentication

1. Access the Auth Plugin

2. Define Username Field

3. Configure Token Expiration

4. Define Required Fields

5. Create Auth

1021(1).mp4

Djuix Auth Setup

The Auth Manager

After defining the fields, the Auth Manager will manage user creation using Django’s built-in BaseUserManager. This includes:

Model Integration

JWT Usage

The inclusion of JWTs is handled within the Djuix.io system. The tokens can be used to authenticate users by including them in the Authorization header as a Bearer token.

When a user successfully authenticates, they receive an access token and a refresh token.

Authorization: Bearer <access_token>

Note: Depending on your project's requirements, Djuix can automatically create an Auth profile when you set up a project using the AI project creation.

Djuix's authentication system provides a secure, flexible, and easy-to-implement solution for protecting your API endpoints. By leveraging JWT and providing an intuitive configuration interface, Djuix ensures that you can focus on building your API's core functionality while maintaining robust security practices.

Remember to regularly review and update your authentication settings, especially token expiry times, to maintain the security of your application.