Building a Secure REST API with OpenID Connect

Introduction

In this article, we’ll take a look at building a secured REST API by integrating with Okta as the identity provider via OpenID Connect (OIDC). This article is based on the DZone article Building a Java REST API with Quarkus, which explains how to create a Java REST API with Quarkus and Okta. We will be implementing a similar scenario here by using Ballerinalang, and show how it’s simpler and more straightforward to implement compared to our Java counterpart. 

Prerequisites

  • Ballerina Installation(>= v1.2.6)
    • Verify the installation by typing “ballerina -v” in the command line. This should output the currently installed Ballerina version.