Configuring Auth 2.0 in APIM for Java APIs Running on App Services

A step by step guide with an example project

Bhargav Bachina
Bachina Labs

--

When you deploy your web apps or APIs on App services you can either expose them directly from the App services endpoint or you can serve through Azure APIM. Using APIM has several advantages such as routing to different apps based on the context path, implementing microservices, adding OAuth, caching layer, sharing your APIs through the Developer portal, etc.

In this post, we will see how to configure OAuth 2.0 for the Java APIs running on the App services through Azure APIM.

  • Prerequisites
  • Example Project
  • Running API on App Services
  • Running API on App Services Through APIM
  • Creating App Registrations
  • Configuring OAuth 2.0
  • Adding OAuth 2.0 to API Gateway
  • Adding Policies to Validate Token
  • Testing with Postman
  • Summary
  • Conclusion

Prerequisites

  • If you are new to Java REST API please go through the below link on how to develop and build the Java REST API with Spring Boot.

--

--