<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Oauth2 on Java &amp; Software Architecture Knowledge Hub</title><link>https://samirsahoo.github.io/design-patterns-hub/tags/oauth2/</link><description>Recent content in Oauth2 on Java &amp; Software Architecture Knowledge Hub</description><generator>Hugo</generator><language>en-US</language><copyright>© 2026 Samir Kumar Sahoo (https://github.com/samirsahoo). All rights reserved.</copyright><atom:link href="https://samirsahoo.github.io/design-patterns-hub/tags/oauth2/index.xml" rel="self" type="application/rss+xml"/><item><title>Authentication and Authorization with OAuth 2.0, OpenID Connect and JWT</title><link>https://samirsahoo.github.io/design-patterns-hub/spring/security/oauth2-oidc-and-jwt/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/spring/security/oauth2-oidc-and-jwt/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Authentication&lt;/strong&gt; proves &lt;strong&gt;who&lt;/strong&gt; someone is. &lt;strong&gt;Authorization&lt;/strong&gt; decides &lt;strong&gt;what they may do&lt;/strong&gt;.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;OAuth 2.0&lt;/strong&gt; is a framework for &lt;strong&gt;delegated authorization&lt;/strong&gt;: an app obtains an &lt;strong&gt;access token&lt;/strong&gt; to call an API on a user&amp;rsquo;s behalf, or on its own behalf.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;OpenID Connect (OIDC)&lt;/strong&gt; adds an &lt;strong&gt;authentication&lt;/strong&gt; layer on top: an &lt;strong&gt;ID token&lt;/strong&gt; that says who logged in.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;JWT (JSON Web Token)&lt;/strong&gt; is a common, self-contained, signed token format.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="the-problem"&gt;The problem&lt;a class="heading-anchor" href="#the-problem" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Every service managing its own passwords leads to weak security, no single sign-on and no MFA. Sharing user passwords with third-party apps is unacceptable. OAuth 2.0 and OIDC centralise login in an &lt;strong&gt;authorization server&lt;/strong&gt; (identity provider) and give apps and APIs &lt;strong&gt;scoped, short-lived tokens&lt;/strong&gt; instead.&lt;/p&gt;</description></item></channel></rss>