Getting Started: Java

What is the Java SDK?

Stormpath’s Java SDK is built on top of the REST API. Various integrations are then built on top of the Java SDK. Currently the Java environment has a generic raw Java SDK, a Java Servlet plugin, and a Spring Boot Web Starter that is a culmination of various Spring integrations. 

When should I use the Java SDK? 

The Java SDK will provide you with wrappers and methods to expose OAuth endpoints that will in-turn make a call to the REST API. Use this if you want to build a web application in raw Java without Spring, Spring Boot or Spring Security. You should also use the SDK if you want to

  • Get a list of all the accounts in my Stormpath Tenant.

  • Manually create accounts in a Directory.

  • Need to create a mapping between an Application and an Account Store.

Documentation

Github Repo

What is Stormpath Spring Boot Web Starter?

Spring Boot Web Starter is a collection of multiple Stormpath Spring and Spring Boot integrations designed to fit many use-cases. For example you might be building a CMD line tool that doesn’t need any web components or you might be building a complex web application in Spring Boot, or just a Spring based API; the web-starter will enable you to pick and choose the one that fits your needs. This web starter includes all of the integrations that are discussed below. The section below is divided into integrations built in Spring and Spring Boot.

If you don't know which one to choose or don't have special needs, then no worries!

You can just get started with one of these: Spring Boot or Spring.

Which Spring Boot integration should I use? 

If you are building your application in Spring Boot and want to leverage a specific Stormpath Spring Boot integration, this guide will help you decide which one to choose.  

Spring Boot Starter Repo - Spring Boot starter is the barebones Stormpath Spring Boot integration. Use this if you are planning on building a command line app, a daemon, or microservice that doesn’t need any web protocols to communicate

WebMVC Spring Boot Starter  - Use this integration if you want to include Stormpath’s Spring Boot’s Web MVC into your app and if you are trying to build a web application. This integration has all the web components you need to integrate your app with Stormpath and make calls to Stormpath but doesn’t provide a view system so you’d need to plug-in your own view system like JSP.

Thymeleaf Spring Boot Starter  - Use this integration if you don’t want to use your own templating system and leverage Stormpath’s templates. This integration is the Spring Boot Web MVC starter along with thymeleaf templating system that includes various default Stormpath thymeleaf views built-in.

Spring Security Spring Boot Repo - Use this integration if you want the functionality of Spring Security and Spring Boot clients in your app. Similar to the Spring Boot starter this extension doesn’t involve any web components and can be used to build things like command line tools and daemons.

Spring Sec Web MVC Spring Boot -  Use this integration if you need Spring Security along with the Stormpathweb-components that come with Spring Boot MVC. This also includes the Thymeleaf templating system with all default Stormpath views.

Which Spring Integration should I use?

This guide will help you decide which Spring integration to use in your application.

Stormpath Spring - This is the barebones Stormpath Spring integration that doesn’t involve any web components and is similar to the Spring Boot Starter in its functionality.

Stormpath Spring MVC - Use this if you want to build a web application in Spring and it doesn’t include any views.

Spring Security - Use this if you want the Spring Security functionality in your app but without the Web MVC.

Spring Security Spring MVC - Use this integration if you want to build a web app using Spring framework and also have the functionality of Stormpath Spring Security integration.

What is the Java Servlet plugin?

The Stormpath Java Servlet Plugin is a drop-in plugin for web applications deployed to a Servlet container, like Tomcat or Jetty. 

Quickstart 

Example Project

Java Resources:

Tutorials:

Build a no-database Spring Boot application with Stormpath’s Custom Data.

Learn how to build a simple web-app with Spring Security and Spring Boot in 15 minutes

Build an application that leverages Stormpath’s IDSite to build a quick web-app and deploy it Heroku

Guides:

Learn how to leverage customData to build powerful Spring-Boot based web-apps

User Login with Servlet, JSP, and Stormpath


 

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.