Skip to content
Spring Security OAuth 2.0 Guide
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
AuthorizationServerApplication Remove unnecessary parent class Mar 1, 2019
OktaOAuthClient
SpringBootOAuthClient Checkin of completed project Mar 1, 2019
LICENSE Add License Mar 10, 2019
README.md Change title Mar 12, 2019

README.md

Spring Security OAuth 2.0 Guide

This example shows how to create a Authorization Server with Spring Security and OAuth 2.0.

Please read A Quick Guide to OAuth 2.0 with Spring Security for a tutorial that shows you how to build the applications in this repo.

Prerequisites: Java 8 or 11.

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 and roles in any application.

Getting Started

To install this example application, run the following commands:

git clone https://github.com/oktadeveloper/okta-spring-boot-authz-server-example.git
cd okta-spring-boot-authz-server-example

Create an Okta Developer Account

If you don't have one, create an Okta Developer account. After you've completed the setup process, log in to your account and navigate to Applications > Add Application. Click Web and Next. On the next page, enter a name for your app (e.g., "Okta OAuth Client"), then click Done.

Update the OktaOAuthClient/src/main/resources/application.yml to have your new app's settings:

okta:
  oauth2:
    issuer: https://{yourOktaDomain}/oauth2/default
    client-id: {yourClientId}
    client-secret: {yourClientSecret}

Start the OktaOAuthClient app using Gradle.

cd OktaOAuthClient
./gradlew bootRun

After everything starts, you should be able to log in with your credentials at http://localhost:8080.

Links

This example uses the following open source projects:

Help

Please post any questions as comments on this repo's blog post, or visit our Okta Developer Forums.

License

Apache 2.0, see LICENSE.

You can’t perform that action at this time.