fouomene / poc-keycloak-spring-with-webapp-gestionmateriel

POC Keycloak and Spring Security Oauth2 to secure WebApp Gestion Materiel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

POC Keycloak and Spring Security Oauth2

POC Keycloak and Spring Security Oauth2 to secure WebApp Gestion Materiel

Keycloak Server

##Setting Up a Keycloak Server

1. Downloading and Installing Keycloak Server

We'll be using the standalone version.

Download the Keycloak Standalone server distribution from the official source. https://www.keycloak.org/downloads.html

Install : official doc https://www.keycloak.org/getting-started/getting-started-zip alt text alt text alt text alt text

2. Creating a Realm call "GestionMaterielSpringKeycloak"

Navigate to the upper left corner to discover the Add realm button

alt text alt text

3. Creating a Client call "login-webapp-gestionmateriel"

Navigate to the Clients page alt text alt text

Leave all the defaults except the Valid Redirect URIs field.

This field should contain webapp Gestion Materiel URL(s) that will use this client for authentication : alt text

4. Creating a Role call "admin" alt text alt text

5. Creating a User call "usertest1" alt text alt text alt text

6. Set password "usertest1" alt text

7. Assign the Role "admin" to our User "usertest1" alt text alt text alt text

Spring Boot APP

Requirements

  1. Java - 1.8.x or greater

  2. Maven - 3.x.x

Steps to Setup

1. Clone the application

https://github.com/fouomene/poc-keycloak-spring-with-webapp-gestionmateriel.git

2. Build and run the app using maven

mvn package
java -jar target/*.jar

Alternatively, you can run the app directly without packaging like this -

mvn spring-boot:run

The app will start running at http://localhost:8282.

http://localhost:8282

Account Keycloak Create

Login : usertest1
Password : usertest1

alt text

alt text

Authors and acknowledgment

Show your appreciation to those who have contributed to the project.

License

For open source projects, say how it is licensed.

Project status

If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.

About

POC Keycloak and Spring Security Oauth2 to secure WebApp Gestion Materiel

License:Apache License 2.0


Languages

Language:Java 99.2%Language:Gherkin 0.8%