Tagged articles
access token
45 articles · Page 1 of 1
This article explains why silent token refresh is needed to prevent sudden logouts, demonstrates backend automatic token renewal using Java JWT (jjwt 0.9.1) with Maven dependencies, details the dual-token (AT/RT) frontend pattern for security and convenience, and discusses handling edge cases like long-idle form submissions that cause 401 errors.
AuthenticationJWTJava
0 likes · 10 min read

This article explains why seamless token refresh prevents sudden logouts, compares backend automatic token renewal with frontend dual-token (access/refresh) approaches, provides Java JWT implementation code with expiration calculations, and discusses handling edge cases like long-form submissions where no requests are sent before token expiry.
AuthenticationFrontend-Backend IntegrationJWT
0 likes · 10 min read

The article explains how replacing centralized session lookups with JWT-based local verification can cut authentication latency from 15 ms to 0.3 ms—a roughly 50‑fold improvement—while describing a double‑token strategy, its refresh flow, security best practices, and trade‑offs such as delayed revocation.
JWTRefresh Tokenaccess token
0 likes · 6 min read

The article explains the inherent trade‑off of a single JWT’s expiration time, shows how using short‑lived Access Tokens together with long‑lived Refresh Tokens resolves both security and user‑experience issues, and provides detailed backend and frontend implementation guidance.
AuthenticationJWTOAuth 2.0
0 likes · 11 min read

This article explains OAuth 2.0 by contrasting it with SSO, walks through a real‑world analogy, details the nine‑step authorization flow, defines key terms and roles, and describes how web servers, user agents, and native apps participate in the protocol.
API authenticationOAuth2.0SSO
0 likes · 11 min read

This comprehensive guide explains why many teams struggle with dual‑token implementations, outlines the three core goals of the mechanism, details threat modeling, design principles, data modeling, JWT claim choices, atomic refresh rotation with Redis Lua, and provides production‑ready Spring Boot code, observability, scaling and security hardening recommendations.
AuthenticationJWTRedis
0 likes · 35 min read

This article explains why a WeChat Mini Program needs an access_token, describes the token's 7200‑second validity, and provides a step‑by‑step Java implementation that builds the request URL, sends an HTTPS GET, parses the JSON response, and outlines a simple caching strategy.
API authenticationHTTPS GETJava
0 likes · 3 min read

Token expiration can be handled with three main strategies—frontend‑driven periodic refresh, backend sliding‑window renewal, and the industry‑standard double‑token (access + refresh) scheme—each balancing implementation simplicity, user experience, and security, with the double‑token approach offering the most robust solution.
AuthenticationRefresh TokenSecurity
0 likes · 7 min read

This article explains the double token (Access Token + Refresh Token) authentication model, compares it with single‑token approaches, outlines production‑grade security measures, recommends token lifetimes, and provides a complete Java Spring Boot implementation with code examples.
JWTRefresh TokenSpring Boot
0 likes · 12 min read

This article explains the roles of access and refresh tokens, their lifecycle, and the step‑by‑step process by which a client obtains, uses, and renews tokens to maintain seamless authentication while enhancing security.
AuthenticationRefresh TokenSecurity
0 likes · 5 min read

This article explains the double token (Access and Refresh) authentication mechanism, detailing its core principles, security benefits, and step‑by‑step implementation with Express on the backend and Vue on the frontend, including token issuance, verification, rotation, middleware, and client‑side handling.
ExpressRefresh Tokenaccess token
0 likes · 17 min read

This article examines the OAuth security challenges in Volcano Engine's Model Context Protocol (MCP) ecosystem and outlines a comprehensive, three‑stage defense strategy—including pre‑authorization double confirmation, token identity isolation, and API‑level permission controls—to protect user assets and data.
MCPOAuthaccess token
0 likes · 13 min read

This article provides a comprehensive overview of OAuth2.0, explaining its core concepts, the roles of resource owner, client, authorization server, and resource server, illustrating the full authorization flow with diagrams, clarifying related terminology such as authentication, delegation, and roles, and finally noting additional promotional material.
OAuth2.0SSOaccess token
0 likes · 14 min read


大转转FEAug 23, 2024 · Information Security
This article explains third‑party authorization login, using WeChat as a concrete example, and provides a detailed walkthrough of the OAuth2.0 protocol, its roles, grant types, token handling, and implementation steps for mobile and web applications.
Authorization CodeOAuth2.0Security
0 likes · 24 min read

This guide explains the JWT standard, its three‑part structure, the authentication flow, and a double‑token solution using short‑lived access tokens and long‑lived refresh tokens, with full PHP code examples, middleware interception, configuration, and client‑side renewal logic.
AuthenticationBackend SecurityJWT
0 likes · 12 min read

This guide explains how to integrate PHP with WeChat Work by registering a corporate account, creating an application, obtaining credentials, using PHP’s HTTP requests to acquire access tokens, and sending messages or retrieving user data, including a complete code example.
APIBackend IntegrationCallback
0 likes · 4 min read

This article describes how to design an open API interface that issues time‑limited access tokens, defines the supporting database schema, implements token generation utilities, creates a token‑issuing endpoint, and secures all open‑API calls with a Spring MVC interceptor.
API SecurityDatabase DesignInterceptor
0 likes · 8 min read

This article provides a comprehensive introduction to the OAuth 2.0 authorization framework, covering its core roles, token concepts, common usage scenarios, the four standard grant types with request/response examples, security considerations, and reference specifications.
APIGrant TypesOAuth2
0 likes · 23 min read

This article provides a comprehensive introduction to the OAuth 2.0 protocol, covering its core concepts, authorization flow, four grant types (authorization code, implicit, resource owner password credentials, client credentials), request and response parameters, token handling, and practical examples with code snippets.
AuthenticationGrant TypesOAuth2.0
0 likes · 22 min read

This article provides a comprehensive introduction to the OAuth 2.0 protocol, explaining its core concepts, the roles of resource owner, client, authorization server and resource server, and detailing the four grant types—authorization code, implicit, resource‑owner password credentials, and client credentials—along with token request/response formats and refresh token usage.
Grant TypesOAuth2.0Refresh Token
0 likes · 23 min read

This article provides a comprehensive introduction to OAuth 2.0, covering its purpose, core roles, token types, four main grant flows (authorization code, implicit, resource‑owner password, client credentials), token refresh mechanisms, and practical request/response examples for developers.
Grant TypesOAuth2.0Security
0 likes · 22 min read

This article provides a comprehensive overview of a token‑based security authentication system, covering terminology, development background, objectives, functional points, technology selection, OAuth2 grant types, JWT fundamentals, authentication flow, credential renewal, and interface design for unified access control across microservices.
JWTOAuth2access token
0 likes · 10 min read

This article explains the fundamental differences between JSON Web Token (JWT) and OAuth2, describes their structures, security considerations, and provides guidance on when to choose each method for protecting API access in modern applications.
API SecurityJWTOAuth2
0 likes · 9 min read

This article explains the OAuth2 authorization framework, illustrates its principles with a delivery‑person analogy, details the four main grant types, and provides a step‑by‑step Spring Boot implementation including server configuration, resource protection, and Postman testing.
Grant TypesOAuth2Spring Boot
0 likes · 17 min read

This article analyzes various client scenarios, classifies authentication tokens, compares their natural and controllable attributes, and proposes a hierarchical token architecture that balances security, privacy, and usability across web, mobile, and API platforms.
AuthenticationMulti-clientaccess token
0 likes · 10 min read

The article explains the design and implementation of a token‑based authentication system for micro‑services, covering terminology, business background, OAuth2 password‑grant flow, JWT usage, security advantages, functional modules, technical choices, detailed authentication workflow, and API design.
JWTOAuth2access token
0 likes · 10 min read


21CTOFeb 2, 2021 · Information Security
This article explains the fundamental differences between JSON Web Tokens (JWT) and OAuth2, outlines their structures, security considerations, implementation details, and compares their advantages, drawbacks, and suitable use cases to help developers choose the appropriate method for securing APIs.
API SecurityJWTOAuth2
0 likes · 10 min read

This article explains the OAuth 2.0 protocol, describes its four grant types, focuses on the Authorization Code and Implicit flows, outlines the involved roles, token types, client registration steps, and provides detailed request‑response examples for both grant types.
Authorization CodeImplicit GrantOAuth 2.0
0 likes · 8 min read

This article explains a real-world case where storing WeChat access tokens in a JSON file caused race conditions, analyzes the root cause, and demonstrates how to use PHP's flock() function with proper locking to safely read and write the token, including sample code.
ConcurrencyFile LockWeChat
0 likes · 6 min read

This article examines the classification, security attributes, and hierarchical design of various authentication tokens for multi‑client systems, offering a layered approach that balances usage cost, change cost, and privacy while outlining practical scenarios and implementation principles.
Multi-clientSecuritySession Management
0 likes · 16 min read


JavaEdgeOct 16, 2020 · Information Security
This article explains the concept of open platforms, the evolution of OAuth 2.0, its core token‑based authorization mechanism, real‑world analogies, and the step‑by‑step Authorization Code grant flow that lets third‑party apps securely access protected resources.
APIAuthorization CodeOAuth 2.0
0 likes · 9 min read

This tutorial explains how to use Baidu AI's Portrait Anime API with Python, covering token acquisition, API key setup, request formation, and code examples for generating both plain anime portraits and masked versions, complete with sample images and usage limits.
APIAnime TransformationBaidu AI
0 likes · 8 min read

This article explains the concept of OAuth, its typical use cases such as third‑party login, the roles of user, service provider, and platform, and provides a step‑by‑step flow with code examples for obtaining authorization codes, access tokens, and user information.
OAuthThird-Party Loginaccess token
0 likes · 11 min read

This guide explains how to integrate WeChat OAuth2.0 login into Android and iOS mobile applications, covering preparation, authorization flow, API calls for access tokens and user info, phone‑number binding, re‑login handling, and test case recommendations.
APIAndroidOAuth2.0
0 likes · 12 min read


21CTOJun 11, 2020 · Information Security
This guide walks developers through the OAuth2 workflow, illustrating how users, client applications, resource servers, and authorization servers interact via access tokens to securely protect and grant access to user data, and highlights the critical steps of token issuance and validation.
OAuth2Securityaccess token
0 likes · 8 min read

This article walks through the OAuth2 workflow, explaining why access tokens are needed, the roles of the resource server, client application, and authorization server, and how tokens are requested, issued, validated, and used to protect user data.
OAuth2Securityaccess token
0 likes · 7 min read

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.
OAuth2Spring Securityaccess token
0 likes · 4 min read

This guide explains how to integrate WeChat OAuth2.0 login into Android and iOS mobile applications, covering preparation, the authorization code flow, token exchange, user‑info retrieval, phone‑number binding, repeated login handling, and comprehensive test cases.
APIAndroidOAuth2.0
0 likes · 11 min read

This article analyses various client scenarios in multi‑client systems, classifies authentication tokens into password, session, API, and other categories, compares them across usage cost, change cost, and security risks, and presents a hierarchical token model with detailed usage steps and practical considerations.
Multi-clientSessionaccess token
0 likes · 12 min read

This article explains the OAuth 2.0 authorization framework, describes its four core roles and various grant types, and demonstrates how to configure a Spring Security OAuth2 client for GitHub login, including endpoint details, request parameters, and code examples.
BackendGrant TypesOAuth2
0 likes · 22 min read

This article explains why JWT has become the preferred method for session management in modern RESTful and SPA architectures, detailing the roles, lifecycles, and implementation steps of access_token and refresh_token, and providing concrete API examples for login and token renewal.
API authenticationJWTRefresh Token
0 likes · 6 min read

This article explains the OAuth authorization process, illustrating how a third‑party app like a WeChat‑based login requests user permission, obtains a code, exchanges it for an access token, and uses that token to access user data, while highlighting token expiration and business‑scenario applications.
OAuthThird-Party LoginWeChat
0 likes · 4 min read

This article explains the OAuth protocol, its role in providing secure third‑party access to user resources, describes the overall authorization architecture, outlines the involved parties and step‑by‑step flow, and details the four main grant types along with token refresh mechanisms.
APIGrant TypesOAuth
0 likes · 6 min read

This article provides a comprehensive Java tutorial for accessing Baidu's OCR service, covering prerequisite setup, Maven dependencies, token acquisition, image-to‑Base64 conversion, HTTP request construction, and performance observations for Chinese, English, and mixed‑language image recognition.
APIBaidu OCRBase64
0 likes · 9 min read

OAuth2 provides a secure, open standard that lets third‑party applications obtain limited user access without exposing passwords, using a token‑based flow involving resource owners, clients, resource servers, and authorization servers, illustrated through a step‑by‑step authorization process.
APIOAuth2Security
0 likes · 4 min read
