GithubHelp home page GithubHelp logo

kumar0981 / okta-spring-boot-oidc-sso-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oktadev/okta-spring-boot-oidc-sso-example

0.0 0.0 0.0 1.87 MB

Shell 0.19% Java 0.32% HTML 0.50% CSS 1.95% JavaScript 97.04%

okta-spring-boot-oidc-sso-example's Introduction

Spring Boot + Okta

This app demonstrates integrating an Okta OpenID Connect application with Spring Boot.

You can deploy directly to Heroku and provision an Okta org at the same time!

Deploy

The app is already configured to integrate with your new Okta org.

When you click the purple button above, you'll give the app a unique name to run in Heroku.

You can SSO to your Okta Admin Console from the Heroku Dashboard and, you can launch this app as shown below:


deploy


heroku dashboard

You can also see the environment variables that have been set in your application as part of the Okta provisioning process. Use the OKTA_ADMIN_EMAIL and OKTA_ADMIN_PASSWORD values to log in to this app:


heroku env settings

Single Sign-On with Spring Boot, OpenID Connect and Okta

This application also demonstrates Single Sign-On across multiple OpenID Connect applications with multiple Authorization Servers defined in Okta.

To use this sample application, you need to create a free developer Okta org. You can do that by going to https://developer.okta.com.

Then, you create two OpenID Connect applications in Okta and run two instances of this application. You can SSO between them!

For more detail about OpenID Connect and how to use this app, check out the blog post here.

Build the app

run:

mvn clean install

Run the app

Included in this repo is a shell script to make it easy to run the app. It works on Mac and Linux:

./run_app.sh \
    --ci <client id for oidc app>  \
    --cs <client secret for oidc app> \
    --is <issuer for oidc app>

If you're on a different system, you can also run the app directly with maven:

mvn spring-boot:run \
    -Dokta.oauth2.clientId=<client id for oidc app> \
    -Dokta.oauth2.clientSecret=<client secret for oidc app> \
    -Dokta.oauth2.issuer=<issuer for oidc app>

okta-spring-boot-oidc-sso-example's People

Contributors

dogeared 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.