Tagged articles
192 articles
Page 2 of 2
Code Ape Tech Column
Code Ape Tech Column
Jul 5, 2022 · Information Security

Understanding and Implementing HttpBasic Authentication in Spring Security

This article explains the classic HttpBasic authentication mode in Spring Security, its limited use cases, how to integrate it with a Spring Boot project by adding Maven dependencies and configuration code, and details the underlying Base64‑based mechanism with step‑by‑step illustrations.

AuthenticationBackendHttpBasic
0 likes · 6 min read
Understanding and Implementing HttpBasic Authentication in Spring Security
Code Ape Tech Column
Code Ape Tech Column
Jun 20, 2022 · Backend Development

Customizing the Token Response Format in Spring Security OAuth2

This article explains how to override Spring Security OAuth2's default /oauth/token endpoint to return a unified response structure by redefining the TokenEndpoint and optionally the CheckTokenEndpoint, providing complete Java code examples and implementation details.

Backend DevelopmentJavaOAuth2
0 likes · 6 min read
Customizing the Token Response Format in Spring Security OAuth2
Programmer DD
Programmer DD
Jun 14, 2022 · Backend Development

Integrating Enterprise WeChat QR Login with Spring Security OAuth2

This guide walks through configuring Enterprise WeChat QR code authentication in a Spring Security OAuth2 application, covering environment setup, application registration, custom OAuth2 request handling, token exchange, user‑info retrieval, and final authentication handling while highlighting common pitfalls and required code snippets.

Enterprise WeChatJavaOAuth2
0 likes · 9 min read
Integrating Enterprise WeChat QR Login with Spring Security OAuth2
Java Architecture Diary
Java Architecture Diary
Jun 13, 2022 · Information Security

Step-by-Step Guide to OAuth2 Token Generation and Authentication Flow

This article walks through the complete OAuth2 token generation process, covering gateway pre‑processing, client authentication, request handling, authentication object assembly, password validation, token creation, storage options, and response handling with code examples and diagrams.

AuthenticationBackendToken Generation
0 likes · 5 min read
Step-by-Step Guide to OAuth2 Token Generation and Authentication Flow
Programmer DD
Programmer DD
Jun 3, 2022 · Backend Development

Spring Security OAuth EOL: Migrate to Spring Security 5.7 & Authorization Server

Spring Security OAuth has reached end‑of‑life, with its documentation removed and code moved to a read‑only Spring attic repository; this guide explains how to detect deprecated dependencies, replace them with Spring Security 5.7’s OAuth2 Client, Resource Server, and the new Spring Authorization Server, ensuring a smooth migration to modern, supported authentication solutions.

BackendJavaOAuth2
0 likes · 7 min read
Spring Security OAuth EOL: Migrate to Spring Security 5.7 & Authorization Server
macrozheng
macrozheng
May 30, 2022 · Information Security

Master Spring Security 5.7: Configure Without WebSecurityConfigurerAdapter

This guide walks you through upgrading to Spring Boot 2.7.0 and Spring Security 5.7.1, showing the deprecated WebSecurityConfigurerAdapter removal, the new SecurityFilterChain approach, and advanced dynamic permission techniques with complete code examples.

JavaSpring Bootspring-security
0 likes · 13 min read
Master Spring Security 5.7: Configure Without WebSecurityConfigurerAdapter
Programmer DD
Programmer DD
May 18, 2022 · Backend Development

How to Isolate Session and JWT Users in Spring Security: Strategies and Pitfalls

This article explains how to separate backend admin users using stateful Session authentication from front‑end app users using stateless JWT in a Spring Security‑based system, covering path‑interception strategies, session key isolation, custom UserDetailsService implementations, and complete configuration examples for an Id Server authorization server.

Backend DevelopmentJavaPath Interception
0 likes · 10 min read
How to Isolate Session and JWT Users in Spring Security: Strategies and Pitfalls
Programmer DD
Programmer DD
May 15, 2022 · Information Security

Secure Spring Cloud Microservices with the New Spring Authorization Server

This article explains how to replace the deprecated Spring Security OAuth2 with a modern Spring Authorization Server solution, detailing the authentication flow, required components, configuration examples for Spring Cloud Gateway, Resource Server, and Id Server, and provides step‑by‑step demo instructions.

Authorization ServerOAuth2Spring Cloud Gateway
0 likes · 9 min read
Secure Spring Cloud Microservices with the New Spring Authorization Server
IT Architects Alliance
IT Architects Alliance
Apr 22, 2022 · Information Security

Implementing Single Sign-On with Spring Security and JWT – A Comprehensive Guide

This article provides a detailed, step‑by‑step tutorial on building a Spring Security‑based Single Sign‑On solution using JWT, covering SSO concepts, JWT structure, RSA encryption, custom authentication filters, Maven project setup, configuration files, and full code examples for both authentication and resource services.

AuthenticationJWTJava
0 likes · 22 min read
Implementing Single Sign-On with Spring Security and JWT – A Comprehensive Guide
Top Architect
Top Architect
Apr 21, 2022 · Information Security

Implementing Single Sign-On with Spring Security and JWT

This article provides a comprehensive 20,000‑word guide on building a Spring Security‑based single sign‑on solution using JWT, covering the SSO concept, token structure, RSA encryption, Maven project setup, configuration files, custom authentication and verification filters, and end‑to‑end testing with Postman.

AuthenticationJWTJava
0 likes · 23 min read
Implementing Single Sign-On with Spring Security and JWT
Architecture Digest
Architecture Digest
Mar 30, 2022 · Backend Development

Implementing a Custom Annotation for Anonymous Access in Spring Security

This article explains how to create a custom @IgnoreAuth annotation and integrate it with Spring Security to automatically whitelist controller methods, comparing the two standard ways of permitting requests—configure(WebSecurity) for static resources and configure(HttpSecurity) for filter‑chain‑aware endpoints—while providing full source code examples.

Custom AnnotationJavaWebSecurityConfigurerAdapter
0 likes · 8 min read
Implementing a Custom Annotation for Anonymous Access in Spring Security
Programmer DD
Programmer DD
Mar 29, 2022 · Information Security

Mastering OAuth2 Client Authentication: From client_secret_jwt to TLS Methods

This article explains the classification of OAuth2 clients, details multiple authentication methods—including client_secret_jwt, private_key_jwt, TLS‑based approaches—and provides code examples and best‑practice recommendations for securely authenticating clients in modern OAuth2 deployments.

OAuth2TLSclient authentication
0 likes · 5 min read
Mastering OAuth2 Client Authentication: From client_secret_jwt to TLS Methods
Programmer DD
Programmer DD
Mar 16, 2022 · Backend Development

How to Use a Custom Annotation for Anonymous Access in Spring Security

This article explains two Spring Security configuration approaches, introduces a custom @IgnoreAuth annotation, and shows how to automatically whitelist annotated endpoints by scanning RequestMappingHandlerMapping, complete with code examples and workflow details.

Anonymous AccessBackend DevelopmentCustom Annotation
0 likes · 10 min read
How to Use a Custom Annotation for Anonymous Access in Spring Security
Programmer DD
Programmer DD
Feb 22, 2022 · Information Security

How Does Spring Security Manage Built‑In Filter Order? A Deep Dive

This article explains how Spring Security’s HttpSecurity class maintains the order of its built‑in filters using FilterOrderRegistration, demonstrates the registration and retrieval logic with code examples, and clarifies how duplicate orders are resolved during filter sorting.

BackendFilter OrderHttpSecurity
0 likes · 8 min read
How Does Spring Security Manage Built‑In Filter Order? A Deep Dive
Top Architect
Top Architect
Jan 18, 2022 · Information Security

Comprehensive Spring Security Guide: Authentication, Authorization, Custom Configurations, and CSRF Protection

This article provides an in‑depth tutorial on Spring Security, covering its core concepts, authentication flow, project setup, dependency imports, custom UserDetailsService, password encoding, login handling, role‑based access control, CSRF protection, and integration with Thymeleaf, complete with practical code examples.

AuthenticationAuthorizationCSRF
0 likes · 16 min read
Comprehensive Spring Security Guide: Authentication, Authorization, Custom Configurations, and CSRF Protection
Code Ape Tech Column
Code Ape Tech Column
Dec 9, 2021 · Information Security

Customizing Exception Responses in Spring Security OAuth2

This article explains how to customize authentication and resource server exception messages in Spring Security OAuth2, covering the creation of custom translators, entry points, and filters, with step‑by‑step code examples and testing procedures for handling username/password errors, grant type errors, client credential errors, token expiration, and insufficient permissions.

AuthenticationBackendException Handling
0 likes · 10 min read
Customizing Exception Responses in Spring Security OAuth2
Code Ape Tech Column
Code Ape Tech Column
Dec 6, 2021 · Information Security

Integrating OAuth2.0 with JWT in Spring Security – Advanced Tutorial

This article explains how to integrate OAuth2.0 with JWT token issuance in Spring Security, covering transparent vs opaque tokens, server‑side configuration, resource‑server validation, testing with Postman, and key source‑code snippets for a complete end‑to‑end authentication solution.

AuthenticationBackendJWT
0 likes · 9 min read
Integrating OAuth2.0 with JWT in Spring Security – Advanced Tutorial
Code Ape Tech Column
Code Ape Tech Column
Dec 2, 2021 · Information Security

Comprehensive Guide to OAuth2.0: Principles, Four Grant Types, and Implementation with Spring Security

This article explains why OAuth2.0 is needed, clarifies the differences between tokens and passwords, describes the OAuth2.0 protocol and its four grant types, and provides a step‑by‑step Spring Boot + Spring Cloud Alibaba implementation of an authorization server and a resource server with full code examples.

AuthenticationAuthorizationSpring Boot
0 likes · 22 min read
Comprehensive Guide to OAuth2.0: Principles, Four Grant Types, and Implementation with Spring Security
Code Ape Tech Column
Code Ape Tech Column
Nov 29, 2021 · Information Security

Implementing JWT-Based Authentication and Authorization with Spring Security in a Frontend‑Backend Separated Architecture

This article explains how to use Spring Security together with JWT to build a stateless authentication system for front‑end/back‑end separated applications, covering token issuance, refresh logic, custom filters, handlers, UserDetailsService implementation, global security configuration, and testing procedures.

AuthenticationAuthorizationBackend
0 likes · 12 min read
Implementing JWT-Based Authentication and Authorization with Spring Security in a Frontend‑Backend Separated Architecture
Programmer DD
Programmer DD
Nov 24, 2021 · Information Security

Shiro vs Spring Security: Which Java Security Framework Fits Your Project?

This article compares Apache Shiro and Spring Security, outlining their core concepts, execution flows, key features, and practical guidance to help developers choose the most suitable Java security framework based on project requirements and team expertise.

AuthenticationAuthorizationJava Security
0 likes · 5 min read
Shiro vs Spring Security: Which Java Security Framework Fits Your Project?
Programmer DD
Programmer DD
Nov 22, 2021 · Backend Development

Mastering Dynamic Permissions in Spring Security 5.6 with SpEL

This article explains how Spring Security 5.6 simplifies dynamic permission control using annotation, SpEL‑based beans, and the new AuthorizationManager API, providing step‑by‑step code examples and configuration tips for developers seeking flexible, low‑overhead security solutions.

AuthorizationManagerDynamic PermissionsJava
0 likes · 5 min read
Mastering Dynamic Permissions in Spring Security 5.6 with SpEL
Programmer DD
Programmer DD
Nov 14, 2021 · Information Security

Deep Dive into Spring Authorization Server: Configuring OAuth2 Filters

This article explains the modular configuration of Spring Security's OAuth2 components, showcases the core config classes for client, resource, and authorization servers, and details the default filter chain and customizable filter configurers used by Spring Authorization Server.

Backend SecurityJavaOAuth2
0 likes · 7 min read
Deep Dive into Spring Authorization Server: Configuring OAuth2 Filters
Programmer DD
Programmer DD
Oct 30, 2021 · Backend Development

How to Transform a Monolith into a Spring Cloud OAuth2 Resource Server

This tutorial walks through converting a monolithic Spring application into a Spring Cloud microservice by implementing a JWT‑based OAuth2 resource server, covering required dependencies, custom JWT decoding, key separation, security filter configuration, and token parsing customization.

Backend DevelopmentJWTOAuth2
0 likes · 10 min read
How to Transform a Monolith into a Spring Cloud OAuth2 Resource Server
Programmer DD
Programmer DD
Oct 29, 2021 · Information Security

Why You Need an OAuth2 Resource Server for Microservice Security

This article explains what an OAuth2 Resource Server is, why traditional monolithic security models become cumbersome in microservice architectures, and how decoupling authentication from authorization using JWTs simplifies token validation across distributed services.

OAuth2Resource Serverspring-security
0 likes · 5 min read
Why You Need an OAuth2 Resource Server for Microservice Security
Programmer DD
Programmer DD
Oct 25, 2021 · Information Security

How to Implement Single Sign‑On with Spring Security and JWT in 30 Minutes

This tutorial walks through the concepts of Single Sign‑On (SSO) and JSON Web Tokens (JWT), then provides a complete Spring Security integration with JWT—including project structure, RSA key handling, utility classes, custom authentication and verification filters, and step‑by‑step testing using Postman.

JWTJavaSSO
0 likes · 19 min read
How to Implement Single Sign‑On with Spring Security and JWT in 30 Minutes
GrowingIO Tech Team
GrowingIO Tech Team
Sep 16, 2021 · Information Security

How GrowingIO Unified OAuth2, LDAP, and CAS for Seamless SSO Integration

GrowingIO’s server-side solution integrates three distinct authentication protocols—OAuth2, LDAP, and CAS—into a unified SSO flow, detailing each protocol’s process, the overall architecture, role of the IAM and Gateway components, and providing configuration and code examples for implementation.

AuthenticationCASLDAP
0 likes · 12 min read
How GrowingIO Unified OAuth2, LDAP, and CAS for Seamless SSO Integration
Programmer DD
Programmer DD
Aug 20, 2021 · Information Security

Keycloak + Spring Security: Unpacking the Filter Chain

This article examines how Keycloak integrates with Spring Security in a Spring Boot application, detailing the custom security filters added to the standard chain, the handling of authentication and authorization for the /admin/foo endpoint, and practical steps to enable detailed logging for deeper insight.

AuthenticationJavaKeycloak
0 likes · 8 min read
Keycloak + Spring Security: Unpacking the Filter Chain
Programmer DD
Programmer DD
Aug 19, 2021 · Backend Development

Integrate WeChat OAuth2 with Spring Security for Secure Web Apps

This guide walks through setting up WeChat web authorization, customizing Spring Security's OAuth2 flow, handling token exchange, and retrieving user info, providing a complete backend solution for secure WeChat-enabled applications.

JavaOAuth2Spring Boot
0 likes · 16 min read
Integrate WeChat OAuth2 with Spring Security for Secure Web Apps
Programmer DD
Programmer DD
Aug 7, 2021 · Information Security

Essential Keycloak Adapter Settings for Spring Security Integration

This article outlines the most commonly used Keycloak adapter configuration properties for Spring Security integration, explaining each setting such as realm, resource, auth-server-url, SSL requirements, CORS, bearer-only mode, and client credentials, and provides guidance on when and how to apply them.

AdapterAuthenticationAuthorization
0 likes · 6 min read
Essential Keycloak Adapter Settings for Spring Security Integration
Programmer DD
Programmer DD
Aug 7, 2021 · Information Security

How to Seamlessly Integrate Keycloak with Spring Security in Spring Boot

This tutorial explains step‑by‑step how to add Keycloak authentication to a Spring Boot application using the Spring Security adapter, covering Maven dependencies, configuration files, custom resolvers, role mapping, session strategies, and the typical authorization code flow.

AuthenticationJavaKeycloak
0 likes · 10 min read
How to Seamlessly Integrate Keycloak with Spring Security in Spring Boot
Programmer DD
Programmer DD
Jul 8, 2021 · Information Security

Keycloak Explained: Powerful Open‑Source SSO Solution, Pros & Cons

Keycloak, Red Hat’s open‑source identity and access management platform, offers a comprehensive SSO solution with extensive protocols, admin UI, Spring Security integration, and customizable features, but its complexity and steep learning curve may pose challenges for smaller projects.

AuthenticationAuthorizationIdentity Management
0 likes · 7 min read
Keycloak Explained: Powerful Open‑Source SSO Solution, Pros & Cons
Programmer DD
Programmer DD
Jul 6, 2021 · Backend Development

Unified Multi-Channel Login with Spring Security: Password, SMS, and Mini‑App

This article demonstrates how to implement a unified authentication system in Spring Security that supports traditional username/password login, SMS-based captcha login, and WeChat Mini‑Program login, detailing the required components, custom filters, provider configurations, and code examples for a production‑ready solution.

AuthenticationCaptchaJava
0 likes · 14 min read
Unified Multi-Channel Login with Spring Security: Password, SMS, and Mini‑App
Top Architect
Top Architect
Jun 15, 2021 · Information Security

Securing Spring Boot Applications with JWT and Spring Security

This tutorial explains how to protect a Spring Boot web application by integrating Spring Security and JSON Web Tokens (JWT), covering project setup, dependency configuration, custom authentication components, security filters, token generation, role‑based access control, and testing with curl commands.

AuthenticationJWTJava
0 likes · 15 min read
Securing Spring Boot Applications with JWT and Spring Security
Programmer DD
Programmer DD
Apr 20, 2021 · Information Security

What’s the Real Difference Between WebSecurity and HttpSecurity in Spring Security?

This article explains the core roles of HttpSecurity and WebSecurity in Spring Security, how they build and manage SecurityFilterChain objects, the purpose of FilterChainProxy, and why WebSecurity serves as the framework’s external entry point while HttpSecurity defines internal security policies.

Backend DevelopmentHttpSecuritySecurityFilterChain
0 likes · 6 min read
What’s the Real Difference Between WebSecurity and HttpSecurity in Spring Security?
Top Architect
Top Architect
Mar 31, 2021 · Information Security

Comparison of Apache Shiro and Spring Security: Features, Execution Flow, and Choosing the Right Framework

This article compares Apache Shiro and Spring Security, outlining each framework's features, execution flow, and strengths, and provides guidance on when to choose Shiro for lightweight, framework-agnostic projects versus Spring Security for deeper Spring integration and broader community support.

AuthenticationAuthorizationJava
0 likes · 5 min read
Comparison of Apache Shiro and Spring Security: Features, Execution Flow, and Choosing the Right Framework
Huawei Cloud Developer Alliance
Huawei Cloud Developer Alliance
Mar 23, 2021 · Backend Development

From Student to Java MVP: Insights from Huawei Cloud’s Top Engineer

In this exclusive interview, Huawei Cloud MVP Jiangnan Yidiayu shares his journey from a management student to a Java development expert, offering career advice, discussing the evolution of Java in the cloud‑native era, and revealing the motivations behind his popular Spring Security book and upcoming tutorials.

Javainterviewspring-security
0 likes · 13 min read
From Student to Java MVP: Insights from Huawei Cloud’s Top Engineer
21CTO
21CTO
Mar 9, 2021 · Backend Development

Mastering OAuth2 SSO with Spring Security and JWT: A Step‑by‑Step Guide

This tutorial walks through building a single sign‑on (SSO) system using OAuth2, Spring Security, and JWT, covering preparation, core concepts, Maven dependencies, configuration files, custom login pages, client setup, logout handling, project structure, and a full demonstration.

AuthenticationBackendJWT
0 likes · 25 min read
Mastering OAuth2 SSO with Spring Security and JWT: A Step‑by‑Step Guide
Programmer DD
Programmer DD
Feb 23, 2021 · Backend Development

Master Spring Security OAuth2: How OAuth2AuthorizationCodeAuthenticationProvider Retrieves Tokens

This article explains the role of OAuth2AuthorizationCodeAuthenticationProvider in Spring Security, details how OAuth2AccessTokenResponseClient obtains access tokens, shows how to customize the token endpoint, and walks through the complete token‑retrieval flow with code examples and step‑by‑step analysis.

AuthenticationAuthorization Code GrantBackend Development
0 likes · 6 min read
Master Spring Security OAuth2: How OAuth2AuthorizationCodeAuthenticationProvider Retrieves Tokens
Code Ape Tech Column
Code Ape Tech Column
Jan 26, 2021 · Backend Development

Step‑by‑Step Guide to Building SSO with JWT and Spring Security

This tutorial explains the concept of Single Sign‑On, demonstrates a simple ticket‑based analogy, introduces JWT structure and RSA signing, and walks through a complete Spring Boot implementation—including project layout, Maven dependencies, configuration files, utility classes, custom authentication and verification filters, security configuration, and Postman testing—so readers can build a secure SSO service from scratch.

AuthenticationAuthorizationJWT
0 likes · 25 min read
Step‑by‑Step Guide to Building SSO with JWT and Spring Security
Programmer DD
Programmer DD
Dec 16, 2020 · Information Security

Spring Security OAuth2 Callback Authentication Explained: Managers & Providers

This article explores how Spring Security processes OAuth2 login callbacks, detailing the role of AuthenticationManager, the creation of OAuth2LoginAuthenticationToken, the selection of appropriate AuthenticationProvider such as OAuth2LoginAuthenticationProvider and OidcAuthorizationCodeAuthenticationProvider, and the subsequent generation of OAuth2User and token objects.

AuthenticationBackend DevelopmentJava
0 likes · 4 min read
Spring Security OAuth2 Callback Authentication Explained: Managers & Providers
Top Architect
Top Architect
Oct 15, 2020 · Information Security

Spring Security Guide: Authentication, Authorization, and Web Security

This comprehensive Spring Security guide explains core concepts of authentication and access control, details the AuthenticationManager and ProviderManager interfaces, shows how to customize authentication managers, configure authorization with AccessDecisionManager, secure web requests with filter chains, and apply method-level security, including asynchronous contexts.

AuthenticationAuthorizationJava
0 likes · 23 min read
Spring Security Guide: Authentication, Authorization, and Web Security
macrozheng
macrozheng
Oct 14, 2020 · Information Security

How Mall’s Permission Management Works: Spring Security & OAuth2 Explained

This article answers common questions about permission management in the Mall and Mall‑Swarm projects, covering deprecated tables, required SQL scripts, front‑end menu visibility, differences between Spring Security and OAuth2‑Gateway implementations, configuration fixes, token usage, and a tiny demo project for learning.

OAuth2permission managementspring-security
0 likes · 8 min read
How Mall’s Permission Management Works: Spring Security & OAuth2 Explained
Programmer DD
Programmer DD
Jul 28, 2020 · Information Security

Step‑by‑Step Guide to Implement SMS Captcha Login with Spring Security

This tutorial walks you through building a complete SMS‑based captcha authentication flow in Spring Security, covering cache lifecycle, service implementation, custom authentication token, provider, filter, and configuration, and shows how to integrate it without affecting existing login methods.

SMS captchaSpring Bootspring-security
0 likes · 19 min read
Step‑by‑Step Guide to Implement SMS Captcha Login with Spring Security
Java Architecture Diary
Java Architecture Diary
May 7, 2020 · Backend Development

How to Customize OAuth 2.0 Token Endpoint in Spring Security

Learn how to retrieve OAuth 2.0 tokens using the password grant, customize the default token endpoint with Spring Security OAuth2, and understand the underlying source code that maps the new endpoint, complete with practical curl commands and Java configuration examples.

JavaOAuth2Token Endpoint
0 likes · 4 min read
How to Customize OAuth 2.0 Token Endpoint in Spring Security
Java Architecture Diary
Java Architecture Diary
Apr 29, 2020 · Backend Development

Enforcing Single-Device Login with Spring Security OAuth2

This article explains how to modify Spring Security OAuth2's token service to enforce a single-device login by customizing token creation and key generation logic, removing existing tokens for the same user and ignoring client identifiers, with code examples and deployment steps.

JavaOAuth2Single Sign-On
0 likes · 5 min read
Enforcing Single-Device Login with Spring Security OAuth2
Architecture Digest
Architecture Digest
Apr 28, 2020 · Information Security

Understanding Spring Security Integration with Servlet Applications

This article explains how Spring Security integrates with Servlet‑based Java web applications by detailing the servlet filter chain, DelegatingFilterProxy, FilterChainProxy, SecurityFilterChain, and providing code examples to help readers grasp authentication and authorization mechanisms.

AuthenticationFilter ChainJava
0 likes · 7 min read
Understanding Spring Security Integration with Servlet Applications
Java Architecture Diary
Java Architecture Diary
Apr 20, 2020 · Backend Development

How to Customize OAuth2 Tokens with Business Data in Spring Security

This article explains how to extend the default OAuth2 token response by embedding business-related fields such as tenant_id, user_id, and username, and walks through the underlying Spring Security code—including the password grant flow, token creation, and enhancement process—illustrated with code snippets and diagrams.

AuthenticationOAuth2Token Customization
0 likes · 5 min read
How to Customize OAuth2 Tokens with Business Data in Spring Security
Java Architecture Diary
Java Architecture Diary
Apr 7, 2020 · Information Security

Why OAuth2 Tokens Miss expires_in and How Spring Security Handles It

The article examines why the demo environment of pig4cloud returns an OAuth2 access token without the expires_in field, contrasts it with a local deployment, analyzes the Spring Security OAuth2 token generation code, and explains that according to the OAuth2 specification the expires_in parameter should be returned even for permanently valid tokens.

OAuth2access_tokenexpires_in
0 likes · 4 min read
Why OAuth2 Tokens Miss expires_in and How Spring Security Handles It
Architecture Digest
Architecture Digest
Dec 29, 2019 · Information Security

Spring Security Guide: Authentication, Authorization, and Customizing Filter Chains

This guide introduces Spring Security fundamentals, explaining authentication and authorization concepts, the core interfaces such as AuthenticationManager and AccessDecisionManager, how to configure them with Spring Boot, customize filter chains, apply method‑level security, and handle thread‑bound security contexts for asynchronous processing.

AuthenticationAuthorizationJava
0 likes · 18 min read
Spring Security Guide: Authentication, Authorization, and Customizing Filter Chains
Programmer DD
Programmer DD
Dec 19, 2019 · Information Security

Master Role-Based Access Control with Spring Security: Practical Guide

This article explains how to implement role‑based access control in Spring Security by embedding roles into UserDetails, configuring HttpSecurity with hasRole/hasAnyRole/hasAuthority, handling anonymous users, and using permitAll, providing code examples and detailed explanations for each approach.

AuthorizationBackend SecurityJava
0 likes · 7 min read
Master Role-Based Access Control with Spring Security: Practical Guide
Programmer DD
Programmer DD
Dec 17, 2019 · Information Security

Understanding RBAC: Role‑Based Access Control Models for Secure Spring Applications

This article explains why Role‑Based Access Control (RBAC) is essential for modern applications, outlines the four RBAC model variants (RBAC0‑RBAC3), clarifies core concepts such as users, roles, sessions and permissions, and shows how RBAC improves scalability and security in Spring Security projects.

RBACRole-Based Access ControlSecurity Architecture
0 likes · 9 min read
Understanding RBAC: Role‑Based Access Control Models for Secure Spring Applications
Programmer DD
Programmer DD
Dec 7, 2019 · Information Security

Master Spring Security Exception Handling: From Authentication to Access Denied

This article explains the different exception types in Spring Security, how HTTP status codes map to authentication and authorization failures, and provides concrete implementations of AuthenticationEntryPoint and AccessDeniedHandler that return JSON responses, along with configuration tips for integrating them into a Spring Boot application.

AuthorizationException HandlingJava
0 likes · 8 min read
Master Spring Security Exception Handling: From Authentication to Access Denied
Programmer DD
Programmer DD
Dec 3, 2019 · Information Security

Mastering Spring Security Logout: Custom Handlers and Configurations

This article walks through the inner workings of Spring Security after login, explains session and token based authentication, and provides step‑by‑step guidance on customizing logout logic with LogoutFilter, LogoutConfigurer, and custom LogoutHandler and LogoutSuccessHandler implementations in Java.

Backend DevelopmentCustom HandlerJava
0 likes · 8 min read
Mastering Spring Security Logout: Custom Handlers and Configurations
Programmer DD
Programmer DD
Nov 24, 2019 · Backend Development

Master Custom Spring Security Configuration in Spring Boot

This article walks through customizing Spring Security in a Spring Boot application by creating a custom security configuration class, overriding authentication manager, web security, and HttpSecurity methods, and explains the default and common HttpSecurity settings with code examples.

Backend DevelopmentJavaSpring Boot
0 likes · 6 min read
Master Custom Spring Security Configuration in Spring Boot
Programmer DD
Programmer DD
Nov 21, 2019 · Backend Development

Mastering Ant‑Style Path Patterns in Spring MVC and Spring Security

This article explains the Ant‑style path matching syntax, its wildcards ?, *, **, the longest‑match rule, and demonstrates how to apply these patterns in Spring MVC controller mappings and Spring Security antMatchers for precise URI access control.

Ant patternBackend DevelopmentSpring MVC
0 likes · 5 min read
Mastering Ant‑Style Path Patterns in Spring MVC and Spring Security
Programmer DD
Programmer DD
Nov 19, 2019 · Backend Development

Unlocking Spring Security Auto‑Configuration in Spring Boot: A Deep Dive

This article explores how Spring Security is automatically configured in Spring Boot, detailing key auto‑configuration classes such as SecurityAutoConfiguration, SpringBootWebSecurityConfiguration, WebSecurityEnablerConfiguration, and the @EnableWebSecurity annotation, while providing code snippets and explanations of their roles in the security filter chain.

Backend DevelopmentJavaSpring Boot
0 likes · 15 min read
Unlocking Spring Security Auto‑Configuration in Spring Boot: A Deep Dive
Programmer DD
Programmer DD
Nov 12, 2019 · Backend Development

How to Return JWT Tokens Directly After Spring Security Login

This tutorial explains how to integrate JWT with Spring Security so that a successful login returns a JWT token instead of a page redirect, covering the authentication flow, custom success and failure handlers, configuration steps, and verification of the returned JSON responses.

Javaspring-security
0 likes · 6 min read
How to Return JWT Tokens Directly After Spring Security Login
Programmer DD
Programmer DD
Nov 9, 2019 · Information Security

Master Spring Security: Custom UserDetailsService and In‑Memory User Management

This guide walks through integrating Spring Security with Spring Boot, explains the UserDetailsServiceAutoConfiguration, demonstrates how to customize UserDetailsManager using in‑memory storage, and shows how to extend it for database‑backed user management, providing complete code examples and practical insights.

Custom UserDetailsManagerInMemoryUserDetailsManagerJava
0 likes · 13 min read
Master Spring Security: Custom UserDetailsService and In‑Memory User Management
Programmer DD
Programmer DD
Nov 3, 2019 · Information Security

Spring Security vs Apache Shiro: Which Java Security Framework Wins?

This article compares Spring Security and Apache Shiro, explaining their authentication and authorization features, filter‑chain mechanisms, RBAC model, and related security concepts to help Java developers choose the right framework for production‑grade web applications.

Apache ShiroAuthenticationRBAC
0 likes · 6 min read
Spring Security vs Apache Shiro: Which Java Security Framework Wins?
macrozheng
macrozheng
Aug 30, 2019 · Backend Development

How to Build and Secure a Spring Boot Admin Dashboard with Eureka Integration

This tutorial walks through setting up Spring Boot Admin as a monitoring server and client, integrating it with Eureka for service discovery, adding Spring Security for authentication, and configuring email and custom notifications, complete with Maven and YAML configurations and Java code examples.

JavaSpring Booteureka
0 likes · 23 min read
How to Build and Secure a Spring Boot Admin Dashboard with Eureka Integration
macrozheng
macrozheng
May 13, 2019 · Backend Development

How to Secure a Spring Boot API with Spring Security and JWT

This tutorial shows how to integrate Spring Security and JWT into a Spring Boot backend to implement user login and authorization, configure Swagger‑UI to automatically include the token, and provides all necessary code snippets, configuration files, and utility classes for a complete authentication solution.

AuthorizationBackendJava
0 likes · 21 min read
How to Secure a Spring Boot API with Spring Security and JWT
Java Architecture Diary
Java Architecture Diary
Mar 20, 2019 · Information Security

Extending Spring OAuth2 Token Validation to Populate Full User Details

This article explains how to customize the default OAuth2 check‑token flow in Spring Cloud by extending the token converter to assemble complete user information—including IDs, department and tenant data—directly into the security context, eliminating extra database queries and improving performance.

AuthenticationJavaOAuth2
0 likes · 5 min read
Extending Spring OAuth2 Token Validation to Populate Full User Details
Programmer DD
Programmer DD
Jan 22, 2018 · Information Security

Step‑by‑Step Spring Security Demo: Login, Logout and Page Protection

This tutorial walks through a complete Spring Boot demo that sets up Maven dependencies, creates Thymeleaf front‑end pages (home, login, hello), implements a main Application class, a HomeController, and a WebSecurityConfig to secure the application with in‑memory authentication, illustrating how to protect URLs, configure a custom login page, and enable logout functionality.

JavaSpring BootThymeleaf
0 likes · 7 min read
Step‑by‑Step Spring Security Demo: Login, Logout and Page Protection
Programmer DD
Programmer DD
Jan 17, 2018 · Backend Development

How to Insert Custom Filters into Spring Security’s Filter Chain

This guide explains how to create a custom Spring Security filter, extend GenericFilterBean, and precisely position it within the default filter chain using HttpSecurity’s addFilterBefore, addFilterAfter, or addFilterAt methods, complete with code examples and configuration steps.

Custom FilterHttpSecurityJava
0 likes · 4 min read
How to Insert Custom Filters into Spring Security’s Filter Chain
Programmer DD
Programmer DD
Jan 14, 2018 · Backend Development

Integrating Spring Security with MyBatis for Database‑Based Login

This guide shows how to combine Spring Security and MyBatis to implement username‑password authentication backed by a MariaDB database, covering repository cloning, database setup, Maven execution, and a deep dive into the underlying authentication filter and provider classes with code examples.

AuthenticationJavaMyBatis
0 likes · 9 min read
Integrating Spring Security with MyBatis for Database‑Based Login
Programmer DD
Programmer DD
Jan 11, 2018 · Information Security

Master Spring Security: A Hands‑On Guide to @EnableWebSecurity and HttpSecurity Configuration

This tutorial walks you through setting up a Spring Boot project with Spring Security, explains the @EnableWebSecurity annotation, shows how to extend WebSecurityConfigurerAdapter, demonstrates overriding configure(AuthenticationManagerBuilder) and configure(HttpSecurity) methods with concrete code examples, and provides a concise reference table of common HttpSecurity methods.

AuthenticationBackend DevelopmentHttpSecurity
0 likes · 7 min read
Master Spring Security: A Hands‑On Guide to @EnableWebSecurity and HttpSecurity Configuration
Programmer DD
Programmer DD
Jan 2, 2018 · Information Security

Understanding Spring Security Architecture: Authentication, Authorization, and Filter Chains

This guide provides a deep dive into Spring Security's architecture, explaining how authentication and authorization are separated, how the AuthenticationManager and AccessDecisionManager work, how web filter chains are organized, and how to apply method‑level security and thread‑local context handling in Java applications.

AuthenticationAuthorizationFilter Chain
0 likes · 17 min read
Understanding Spring Security Architecture: Authentication, Authorization, and Filter Chains
Programmer DD
Programmer DD
Dec 17, 2017 · Backend Development

Your One‑Stop Spring Guide: Boot, Cloud, and Security Resources

This weekend roundup compiles essential Spring Boot, Spring Cloud, and Spring Security articles—including quick starts, deep‑dive tutorials, microservice patterns, API‑gateway tips, and OAuth2 guides—providing developers a convenient reference list to enhance their Java backend expertise.

JavaMicroservicesSpring Boot
0 likes · 6 min read
Your One‑Stop Spring Guide: Boot, Cloud, and Security Resources
Java Captain
Java Captain
Oct 27, 2017 · Information Security

Practical Tips for Securing and Optimizing Java APIs

This article presents a collection of straightforward, developer‑friendly techniques for enhancing Java API security and performance, covering API key protection, TLS adoption, Spring Boot web service creation, application monitoring, and safeguarding sensitive configuration files.

API SecurityPerformance MonitoringTLS
0 likes · 8 min read
Practical Tips for Securing and Optimizing Java APIs
Programmer DD
Programmer DD
Oct 6, 2017 · Information Security

How Spring Security’s Core Configurations Protect Your Application

This article breaks down Spring Security’s three core Java configuration components—@EnableWebSecurity, WebSecurityConfiguration, and AuthenticationConfiguration—explaining how they replace XML setup, register the security filter chain, build the AuthenticationManager, and enable fine‑grained HttpSecurity rules such as path protection, form login, logout, CSRF, and security headers.

AuthenticationManagerHttpSecurityIn-Memory Authentication
0 likes · 8 min read
How Spring Security’s Core Configurations Protect Your Application
Programmer DD
Programmer DD
Aug 11, 2017 · Backend Development

How @EnableResourceServer Configures OAuth2 Token Validation in Spring Security

This article breaks down the internal workflow of Spring Security’s @EnableResourceServer, explaining how OAuth2 tokens are extracted, validated, and turned into authentication objects through ResourceServerSecurityConfigurer, OAuth2AuthenticationProcessingFilter, OAuth2AuthenticationManager, and related components.

AuthenticationJavaOAuth2
0 likes · 11 min read
How @EnableResourceServer Configures OAuth2 Token Validation in Spring Security
Programmer DD
Programmer DD
Aug 9, 2017 · Information Security

Secure Spring Boot APIs with OAuth2: A Hands‑On Tutorial

This article walks through building a Spring Boot application that protects HTTP endpoints using OAuth2, covering password and client‑credentials flows, Maven setup, resource and authorization server configuration, in‑memory users, token retrieval, and accessing secured resources with detailed code examples.

API SecurityClient CredentialsJava
0 likes · 13 min read
Secure Spring Boot APIs with OAuth2: A Hands‑On Tutorial