Django Configuration, CSRF Protection, and Auth Module Implementation
Dynamic Configuration Using Importlib
To implement dynamic configuration similar to Django's middleware system:
import importlib
module_path = 'lib_test.test'
module = importlib.import_module(module_path)
print(module) # <module 'lib_test.test' ...>
Middleware-Style Configuration
Create a pluggable notification system:
# settings.py
NO ...
Posted on Wed, 21 Oct 2026 16:29:43 +0000 by mlnsharma
Redirecting to the Original Page After Login with Django's @login_required
This article explains how to redirect users back to the originally requested page after a successful login when using Django's @login_required decorator.
When an unauthenticated user tries to access a view protected by @login_required, they are redirected to the login page. The challenge is ensuring that after successful login, the user returns ...
Posted on Wed, 21 Oct 2026 16:22:16 +0000 by krelian
Implementing Spring Security 5 with Spring MVC: Configuration and Custom Authentication Flow
Core Dependencies
Include the foundational artifacts required for secure endpoint protection within a Spring MVC architecture.
<properties>
<spring.security.version>5.0.5.RELEASE</spring.security.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.security< ...
Posted on Sat, 17 Oct 2026 16:16:07 +0000 by deljhp
Generating Random CAPTCHA Images with Python
Introduciton
When developing user authentication systems, implementing a CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is an effective security measure. This article demonstrates how to create random CAPTCHA images with accompanying text using Python's Pillow library.
Required Modules
Before implementing t ...
Posted on Fri, 16 Oct 2026 16:11:29 +0000 by theonlydrayk
Understanding Apache Shiro: Authentication, Authorization, and Custom Realms
Apache Shiro is a lightweight yet powerful Java security framework that handles authentication, authorization, session management, cryptography, and more. Unlike Spring Security, Shiro is modular, easy to integrate, and does not require Spring.
Core Components
Subject: Represents the current user (or system entity) interacting with the applica ...
Posted on Sat, 10 Oct 2026 16:19:28 +0000 by HEAD
Implementing SSH Key Authentication for Secure Linux Server Access
Generating SSH Key Pairs on the Source Server
To begin the key-based authentication process, generate a cryptographic key pair on the source machine. The default storage location will be /root/.ssh:
# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'
...
Posted on Fri, 09 Oct 2026 16:10:17 +0000 by sidney
Implementing JWT Token Auto-Refresh for Continuous User Sessions in Go
Overview
When building authentication systems, it's often necessary to extend token validity while users remain active. This implementation provides a sliding window expiration mechanism where tokens are automatically refreshed as long as the user continues to make requests.
Implementation
package api
import (
"net/http"
"time ...
Posted on Mon, 05 Oct 2026 16:26:19 +0000 by fizix
Implementing Session-Based Access Control in Java Servlets
Project Overview
This tutorial demonstrates how to implement an authentication mechanism using Java Servlets and HttpSession. The objective is to ensure that a user logs in once and gains access to protected resources within the same session. If a user attempts to access a protected resource without an active session, they are redirected to the ...
Posted on Mon, 05 Oct 2026 16:17:38 +0000 by project3
Implementing Login Authentication with Flask-HTTPAuth and PyJWT in Python
This guide covers using Flask-HTTPAuth and PyJWT to implement token-based login authentication in a Flask application.
Install Dependencies
First, install the required packages:
pip install Flask-HTTPAuth pyjwt passlib
Flask-HTTPAuth documentation
PyJWT documentation
Passlib documentation
Verify Token Implementation
The following code demons ...
Posted on Thu, 01 Oct 2026 16:08:36 +0000 by wazza
Generating and Validating JWT Tokens in Java with JJWT
JWT Essentials
A JSON Web Token (JWT) is a compact, URL-safe string that carries digitally-signed claims. Because the signature guarantees integrity, any party in possession of the token can trust its contents without contacting the issuer. Typical use cases include single-sign-on flows, micro-service authentication, and stateless session manag ...
Posted on Fri, 25 Sep 2026 16:37:21 +0000 by anthylon