Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

oktadev/okta-spring-boot-login-options-example

 
 

Repository files navigation

This repository shows how to create a plethora of login options for Spring Boot 2.1. Please readA Quick Guide to Spring Boot Login Options to see how this example was created.

Prerequisites:Java 8.

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, run the following commands:

git clone https://github.com/oktadeveloper/okta-spring-boot-login-options-example.gitcd okta-spring-boot-login-options-example

Thebasic-auth,custom-form-auth, andform-auth examples can all be run using:

./gradlew bootRun

Look at the code or theblog post for the hard-coded credentials. The blog post also has instructions for configuring GitHub and Okta as identity providers.

To run theoauth-okta-starter example, you'll need to create an account and OIDC app on Okta.

Create an Application in Okta

Log in to your Okta Developer account (orsign up if you don’t have an account).

  1. From theApplications page, chooseAdd Application.
  2. On the Create New Application page, selectWeb.
  3. Give your app a memorable name, addhttp://localhost:8080/login/oauth2/code/okta as a Login redirect URI, then clickDone.

Copy your issuer (found underAPI >Authorization Servers), client ID, and client secret intooauth-okta-starter/src/main/resources/application.yml as follows:

okta:oauth2:issuer:https://{yourOktaDomain}/oauth2/defaultclient-id:{yourClientID}client-secret:{yourClientSecret}

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

After modifying this file, start the example with./gradlew bootRun. You should be able to authenticate with Okta athttp://localhost:8080.

Links

This example uses the following open source libraries:

Help

Please post any questions as comments on theblog post, or on theOkta Developer Forums.

License

Apache 2.0, seeLICENSE.

Releases

No releases published

Packages

No packages published

Languages

  • Java83.1%
  • HTML13.4%
  • CSS3.5%

[8]ページ先頭

©2009-2025 Movatter.jp