• Stars
    star
    214
  • Rank 184,678 (Top 4 %)
  • Language
    Java
  • Created almost 7 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Example Spring Boot + Spring Security+ OAuth2 project for demonstration purposes.

Spring Boot + Spring Security + OAuth2

Example Spring Boot + Hibernate + Spring Security + OAuth2 project for demonstration purposes.

Getting started

Prerequisites:

  • Java 8
  • Maven
  • H2/PostgreSQL

It is possible to run application in one of two profiles:

  • h2
  • postgres

depending on database engine chose for testing.

To enable cache statistics dev profile needs to be turned on.

Testing database schema

database-schema

Authentication

curl -X POST \
  http://localhost:8080/oauth/token \
  -H 'authorization: Basic c3ByaW5nLXNlY3VyaXR5LW9hdXRoMi1yZWFkLXdyaXRlLWNsaWVudDpzcHJpbmctc2VjdXJpdHktb2F1dGgyLXJlYWQtd3JpdGUtY2xpZW50LXBhc3N3b3JkMTIzNA==' \
  -F grant_type=password \
  -F username=admin \
  -F password=admin1234 \
  -F client_id=spring-security-oauth2-read-write-client

Accessing secured endpoints

curl -X GET \
  http://localhost:8080/secured/company/ \
  -H 'authorization: Bearer e6631caa-bcf9-433c-8e54-3511fa55816d'

More Repositories

1

play-silhouette-rest-mongo

Seed project for Play Framework 2.6 with Silhouette 5.0, exposing a REST API for sign-up and signin. ReactiveMongo + MongoDB used as a backing store.
Scala
19
star
2

company-structure-hibernate-cache

Example Spring Boot + Hibernate + Ehcache project for demonstration purposes of cache mechanism.
14
star
3

company-structure-spring-security-oauth2-cache

Example Spring Boot + Hibernate + OAuth2 + Redis/EhCache project for demonstration purposes of cache mechanism.
13
star
4

EntityGraph

Example Spring Boot REST app that shows different approaches for querying data from database with JPA.
Java
11
star
5

company-structure-spring-security-oauth2-swagger

Example Spring Boot + Hibernate + OAuth 2 + Swagger 2 project for demonstration purposes of Swagger capabilities.
Java
8
star
6

play-silhouette-rest-slick-reactjs-typescript

Example BackEnd project for Play Framework that uses Silhouette for authentication and authorization, exposed REST API for sign-up, sign-in + example FrontEnd project for ReactJS+ Typescript used for handling view layer.
Scala
7
star
7

company-structure-spring-security-oauth2-roles

Example Spring Boot + Spring Security+ OAuth2 project for demonstration purposes.
Java
6
star
8

play-silhouette-rest-slick

Seed project for Play Framework 2.6 with Silhouette 5.0, exposing a REST API for sign-up and signin. Slick + H2 used as a backing store.
Scala
6
star
9

company-structure-hibernate-history

Example Spring Boot + Hibernate + Hibernate Envers project for demonstration purposes of entities auditing mechanism.
Java
5
star
10

spring-boot-metrics

Example Spring Boot REST app that shares metrics to InfluxDB.
Java
2
star
11

java-performance

Java
1
star
12

play-silhouette-rest-reactjs-frontend

Seed FrontEnd project for Play Framework 2.6 with Silhouette 5.0, exposing a REST API for sign-up and signin. ReactJS+ Typescript used for handling view layer.
TypeScript
1
star