<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gursimar Singh</title>
    <description>The latest articles on DEV Community by Gursimar Singh (@gursimar_singh_ab968ebd52).</description>
    <link>https://dev.to/gursimar_singh_ab968ebd52</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4238060%2Fc8da5be4-8b89-4dc1-820a-174d3029cbff.jpg</url>
      <title>DEV Community: Gursimar Singh</title>
      <link>https://dev.to/gursimar_singh_ab968ebd52</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gursimar_singh_ab968ebd52"/>
    <language>en</language>
    <item>
      <title>Securing Kotlin and Spring Boot APIs with OAuth2 and JWT: A Beginner Guide Worth Reading</title>
      <dc:creator>Gursimar Singh</dc:creator>
      <pubDate>Wed, 11 Nov 2026 00:39:59 +0000</pubDate>
      <link>https://dev.to/gursimar_singh_ab968ebd52/securing-kotlin-and-spring-boot-apis-with-oauth2-and-jwt-a-beginner-guide-worth-reading-94</link>
      <guid>https://dev.to/gursimar_singh_ab968ebd52/securing-kotlin-and-spring-boot-apis-with-oauth2-and-jwt-a-beginner-guide-worth-reading-94</guid>
      <description>&lt;p&gt;If you’ve built a REST API with Spring Boot and Kotlin but never locked it down with tokens, JetBrains has a tutorial that’s a solid place to start: &lt;a href="https://blog.jetbrains.com/kotlin/2026/07/secure-your-apis-oauth2-and-jwt-for-beginners/" rel="noopener noreferrer"&gt;Secure Your APIs: OAuth2 and JWT for Beginners.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What it covers&lt;/p&gt;

&lt;p&gt;The tutorial starts with the basics: the difference between authentication and authorization, the four roles in OAuth2, and how a JWT is put together. It then builds a small document management API and sets it up as a resource server that verifies RS256-signed tokens using a public key.&lt;/p&gt;

&lt;p&gt;From there it gets more practical. It maps scopes, roles and permissions from token claims into Spring authorities, and uses @PreAuthorize with method security so access rules live in one place instead of being scattered through controller code.&lt;/p&gt;

&lt;p&gt;Who it’s for&lt;/p&gt;

&lt;p&gt;Developers who know some Spring or Kotlin but are new to OAuth2 and JWT. You’ll want IntelliJ IDEA, Java 17 and Gradle if you follow along.&lt;/p&gt;

&lt;p&gt;What I’m taking from it&lt;/p&gt;

&lt;p&gt;The section on issuer and audience validation. It’s easy to stop once you’ve confirmed a token is properly signed, but a valid token issued for a different service shouldn’t get into yours. I see this check skipped a lot in internal APIs, and it matters more now that AI agents are calling APIs with tokens on users’ behalf.&lt;/p&gt;

&lt;p&gt;Read the full tutorial here: &lt;a href="https://blog.jetbrains.com/kotlin/2026/07/secure-your-apis-oauth2-and-jwt-for-beginners/" rel="noopener noreferrer"&gt;Secure Your APIs: OAuth2 and JWT for Beginners&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kotlin</category>
      <category>springboot</category>
      <category>security</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
