Code Monkey home page Code Monkey logo

stormpath-spring-boot-angular-example's Introduction

#Stormpath is Joining Okta We are incredibly excited to announce that Stormpath is joining forces with Okta. Please visit the Migration FAQs for a detailed look at what this means for Stormpath users.

We're available to answer all questions at [email protected].

stormpath-spring-boot-angular-example

This is a simple web app integrated with Stormpath supporting an Angular rich client UI.

You can see the example live here.

You can even deploy it to your own Heroku account: Deploy

Setup

Build

mvn clean install

Run

java -jar target/*.jar

Use

Browser to localhost:8080 and you will see the Angular SPA.

You can create a Stormpath Account and then login, at which point the app will address you by name.

Details

The included Angular app is served as a set of static pages that make use of the Stormpath Angular SDK.

The Angular app makes GET requests to the Spring Boot app to get view models for rendering, such as the login and register models.

It also makes POST requests to the Spring Boot app for perform operations like logging in and registering.

By default, The Angular app will handle routing. However, if someone bookmarks a page or does a force-refresh, it will cause a request to be sent to the Spring Boot app.

There's a single controller defined in the project: AngularController. It's only job is to ensure that requests to common auth endpoints (such as /login and /register) forward back to the Angular app.

We ensure tha that the Spring Boot app will not attempt to serve text/html requests for the auth endpoints by adding:

stormpath.web.produces = application/json

to the application.properties file. (The default is: stormpath.web.produces = application/json, text/html) This instructs the Stormpath Spring Boot integration to only handle application/json requests with the built-in auth endpoints and to let text/html requests pass through to this Spring Boot application. The AngularController has the path definitions for handling those auth endpoints.

stormpath-spring-boot-angular-example's People

Contributors

brentstormpath avatar dogeared avatar lhazlewood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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