GithubHelp home page GithubHelp logo

isabella232 / okta-java-serverless-aws-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oktadev/okta-java-serverless-aws-example

0.0 0.0 0.0 81 KB

Java Serverless on AWS

Home Page: https://developer.okta.com/blog/2020/05/27/serverless-java-aws

License: Apache License 2.0

Java 100.00%

okta-java-serverless-aws-example's Introduction

Java Serverless AWS Example

A Java + AWS serverless example app that shows how to create a Java REST endpoint on AWS and secure it with Okta and JWT.

Please read Serverless Java with Amazon Web Services to see how this example was created.

Prerequisites:

Okta has Authentication and User Management APIs that reduce development time with instant-on, scalable user infrastructure. Okta's intuitive API and expert support make it easy for developers to authenticate, manage, and secure users + roles in any application.

Getting Started

To install this example application, run the following commands:

git clone https://github.com/oktadeveloper/okta-java-serverless-aws-example.git
cd okta-java-serverless-aws-example

This will get a copy of the project installed locally.

Create an OIDC App in Okta

You will need to create an OIDC application.

  1. From the top menu, click on the Application button. Click the Add Application button.
  2. Select application type Web.
  3. Click Next.
  4. Give the app a name. I named mine Okta Serverless Lambda.
  5. Under Login redirect URIs, add a new URI: https://oidcdebugger.com/debug

The rest of the default values will work.

Click Done.

Leave the page open or take note of the Client ID. You'll need it in a bit when you generate a token.

Open src/main/resources/config.properties and fill in the correct value for okta.oauth.issuer using your Okta developer URI. It will look something like dev-123456.okta.com. You can find it by going to your Okta developer dashboard and, from the top menu, selecting API and Authorization servers. You want the Issuer URI for the default authorization server in the table.

okta.oauth.issuer=https://{yourOktaUrl}/oauth2/default
okta.oauth.audience=api://default
okta.oauth.connectionTimeoutSeconds=10
okta.oauth.readTimeoutSeconds=10

NOTE: The value of {yourOktaUrl} should be something like dev-123456.okta.com. Make sure you don't include -admin in the value!

After modifying this file your app will be protected by Okta! See this repo's blog post to learn how to deploy this example on AWS Lambda.

Links

This example uses Okta JWT Verifier for Java to integrate with Okta.

Help

Please post any questions as comments on the blog post, or visit our Okta Developer Forums.

License

Apache 2.0, see LICENSE.

okta-java-serverless-aws-example's People

Contributors

moksamedia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.