SShortSingh.
Back to feed

Developer Replaces Basic Auth with JWT and OAuth2 in Spring Security App

0
·3 views

A developer has upgraded a Spring Security application by replacing HTTP Basic Authentication with JWT-based login and OAuth2 support. Under the old setup, raw credentials were sent with every request using only base64 encoding, offering no token expiry or proper logout mechanism. The new flow issues a signed JWT upon login, which carries user identity and role claims and is validated on each subsequent request via a custom filter. OAuth2 login was also integrated, automatically creating a local user record with a default role on first sign-in, ensuring both authentication paths feed into the same role-based access control system. The developer also implemented distinct error responses to differentiate expired tokens from invalid ones, improving client-side handling of authentication failures.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Google Launches Gemini 3.8 Live Models With Background Reasoning During Voice Chats

Google has released two new AI models, Gemini 3.8 Live and Gemini 3.8 Live Extended Thinking, designed to conduct real-time voice conversations while simultaneously handling background tasks and visual context. The standard model is positioned as a cost-efficient option for live dialogue, while the Extended Thinking variant targets more complex, multi-step reasoning tasks. Both models support multilingual switching, tool calling, and visual-context handling without interrupting an ongoing conversation. They are being rolled out across multiple channels, including the Gemini Live API, Google AI Studio, Gemini Enterprise, and consumer-facing products like the Gemini app and Search Live. Google has not yet disclosed full pricing details or a complete regional rollout schedule, and some enterprise features remain in forthcoming preview stages.

0
ProgrammingDEV Community ·

Developer releases pure-Go Bash 5.3 binary that runs natively on Windows

A developer has released Bashy, a Bash 5.3 implementation written entirely in pure Go with no CGo dependency, designed to run the same shell scripts across Linux, macOS, and Windows from a single static binary. The project is built on top of the open-source mvdan/sh shell interpreter by Daniel Martí. It passes all 86 runnable test fixtures from GNU Bash's official test suite on Linux and macOS, though Windows compatibility is not yet measured to the same standard. On Windows, Bashy is self-sufficient — it can fetch its own Git toolchain and Go compiler, then rebuild itself from scratch with no pre-installed dependencies. The project is available under the BSD-3 licence, with source code and a tour repository of 27 example scripts hosted on GitHub.

0
ProgrammingDEV Community ·

OpenAI Codex Failed to Complete a Single Run in Six Days on Open-Source AI Agent

A developer gave OpenAI's Codex six days to work on Goose, an open-source local AI agent, but the tool never completed a single full run. Rather than advancing the actual feature, Codex repeatedly over-engineered the project's quality gates, turning a ten-minute build cycle into one lasting over an hour without catching any new defects. The agent also applied unprompted security hardening — including threat modeling and defensive layers — to a single-user local development tool that had no such requirements. Notably, the same underlying model, GPT-5.6 Sol, performed well on the same codebase when run through Goose's own engine instead. The author concluded the failure was not a model problem but a harness problem, attributing the breakdown entirely to how Codex orchestrated the work.

0
ProgrammingDEV Community ·

AI Hardware Costs Force Amazon to Shorten Server Lifespans, Dragging Free Cash Flow Negative

Amazon revised the estimated useful life of some servers downward in 2025, citing rapid advances in AI and machine learning, a move it acknowledged would reduce operating income by roughly $1.3 billion through accelerated depreciation and related charges. The decision stood out because it was made even as AWS reported $42.2 billion in quarterly revenue and an AI business exceeding $25 billion in annualized run-rate. Despite strong earnings, Amazon's trailing-twelve-month free cash flow turned negative at $7.6 billion, driven by a $66.1 billion surge in property and equipment purchases tied primarily to AI infrastructure. In contrast, Microsoft, Alphabet, and Meta had all recently extended their server useful-life estimates, each booking billions in reduced depreciation and higher reported profits. Amazon's reversal highlights a broader tension in the AI buildout: the same investments generating revenue are also consuming capital at a pace that strains conventional financial metrics.