Okta Spring Boot Starter
Okta's Spring Boot Starter will enable your Spring Boot application to work with Okta via OAuth 2.0/OIDC. Jump to our quickstart to see how to configure various clients or follow along below to use curl.
NOTE: This library works with Spring Boot 2.1+. If you need support for Spring Boot 1.5.x, use version version 0.6.
What you need
- An Okta account (sign up for a forever-free developer account)
- An OIDC application (typically a 'SPA' application)
- An access token
Include the dependency
For Apache Maven:
<dependency>
<groupId>com.okta.spring</groupId>
<artifactId>okta-spring-boot-starter</artifactId>
</dependency>
For Gradle:
compile 'com.okta.spring:okta-spring-boot-starter'
Supporting client side applications - OAuth Implicit flow
Are you writing a backend endpoints in order to support a client side application? If so follow along, otherwise skip to the next section.
Configure your properties
You can configure your applications properties with environment variables, system properties, or configuration files. Take a look at the Spring Boot documentation for more details.