Skip to content

The goal of this sample is to play with Spring Boot REST API using Spring Security LDAP

Notifications You must be signed in to change notification settings

IrinaRozhnovskaya/spring-ldap-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-ldap-example

The goal of this sample is to play with Spring Boot REST API using Spring Security LDAP.

Start docker-compose containers

docker-compose up -d

Run application

./mvnw clean spring-boot:run

Testing

curl -i localhost:8080/api/public
HTTP/1.1 200
Welcome to the public page!
curl -i localhost:8080/api/private
HTTP/1.1 401
   {
     "timestamp": "2021-04-04T15:55:52.461+00:00",
     "status": 401,
     "error": "Unauthorized",
     "message": "Unauthorized",
     "path": "/api/private"
   }
curl -i -u user:password localhost:8080/api/private
HTTP/1.1 200
user, welcome to the private page!

Cleanup

  • To stop app running press Ctrl+C

  • To stop and remove docker-compose containers, networks and volumes run

    docker-compose down -v
    

Reference Documentation

About

The goal of this sample is to play with Spring Boot REST API using Spring Security LDAP

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published