If you're already a student of Learn Spring Security, you can get started diving deeper into OAuth2 with Module 10, and then Modules 12, 13, and the upcoming module 17.
If you're not yet a student, you can get access to the course here: http://bit.ly/github-lss
mvn clean install
This project contains a number of modules, but here are the main ones you should focus on and run:
oauth-authorization-server
- the Authorization Server (port = 8081)oauth-resource-server-1
- the Resource Server (port = 8082)oauth-resource-server-2
- the secondary Resource Server (port = 8088)
And, depending on what grant type you want to try out, you'll work with one of these UI/Clients:
angularjs/oauth-ui-implicit
(port = 8083)angularjs/oauth-ui-password
(port = 8084)
Other Modules:
clients-angular/oauth-ui-implicit-angular
- another version of the Implicit Grant UI Module - using Angular 6clients-angular/oauth-ui-password-angular
- another version of the Password Grant UI Module - using Angular 6clients-angular/oauth-ui-authorization-code-angular
- Authorization Code Grant UI Module - using Angular 6
Finally, you can ignore all other modules.
You can run any sub-module using command line:
mvn spring-boot:run
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:
http://localhost:8084/
You can login using these credentials, username:john and password:123
- To run any of Angular6 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:
cd src/main/resources
And run the command to download the dependencies:
npm install
- Finally, we will start our app:
npm start
- Note: Angular6 modules are commented out because these don't build on Jenkins as they need npm installed, but they build properly locally
- Note for Angular version < 4.3.0: You should comment out the HttpClient and HttpClientModule import in app.module and app.service.ts. These version rely on the HttpModule.
- Spring REST API + OAuth2 + AngularJS
- Using JWT with Spring Security OAuth
- OAuth2 for a Spring REST API – Handle the Refresh Token in AngularJS
- Spring Security OAuth2 – Simple Token Revocation
- OAuth2.0 and Dynamic Client Registration
- Testing an OAuth Secured API with the Spring MVC Test Support
- Logout in a OAuth Secured Application
- OAuth2 Remember Me with Refresh Token
- Angular 4 Upgrade for Spring Security OAuth
- New in Spring Security OAuth2 – Verify Claims
- Front-End App with Spring Security OAuth – Authorization Code Flow
- Setting Up Swagger 2 with a Spring REST API