I've just announced a new course, dedicated on exploring the new OAuth2 stack in Spring Security 5 - Learn Spring Security OAuth: http://bit.ly/github-lsso
mvn clean install
This project contains a number of modules, here is a quick description of what each module contains:
oauth-rest- Authorization Server (Keycloak), Resource Server and Angular App based on the new Spring Security 5 stack
oauth-jwt- Authorization Server (Keycloak), Resource Server and Angular App based on the new Spring Security 5 stack, focused on JWT support
oauth-jws-jwk-legacy- Authorization Server and Resource Server for JWS + JWK in a Spring Security OAuth2 Application
oauth-legacy- Authorization Server, Resource Server, Angular and AngularJS Apps for legacy Spring Security OAuth2
You can run any sub-module using command line:
If you're using Spring STS, you can also import them and run them directly, via the Boot Dashboard
You can then access the UI application - for example the module using the Password Grant - like this:
You can login using these credentials, username:john and password:123
To run any of Angular7 front-end modules (spring-security-oauth-ui-implicit-angular , spring-security-oauth-ui-password-angular and oauth-ui-authorization-code-angular) , we need to build the app first:
mvn clean install
Then we need to navigate to our Angular app directory:
And run the command to download the dependencies:
The clients-SPA-legacy/clients-js-only-react-legacy project includes a very simple Spring Boot Application serving a couple of separate Single-Page-Applications developed in React.
It includes two pages:
The Step-By-Step guide supports using different providers (Authorization Servers) by just adding (or uncommenting) the corresponding entries in the static/spa/js/configs.js.
After running the Spring Boot Application (a simple mvn spring-boot:run command will be enough), we can browse to http://localhost:8080/pkce-stepbystep/index.html and follow the steps to find out what it takes to obtain an access token using the Authorization Code with PKCE Flow.
When prompted the login form, we might need to create a user for our Application first.
To use all the features contained in the http://localhost:8080/pkce-realcase/index.html page, we'll need to first start the resource server (clients-SPA-legacy/oauth-resource-server-auth0-legacy).
In this page, we can: