A simple REST API built with Spring Boot and OrientDB (Object API) datastore, secured with Apache Shiro (distributed session storage powered by Hazelcast).
A simple REST API built with Spring Boot and OrientDB (Object API) datastore, secured with Apache Shiro (distributed session storage powered by Hazelcast).
This sample project is comprehended by the following:
We need spring-data-orientdbfor Spring Data OrientDB support.
We'll be checking out a commit known to be working at the time of this writing.
git clone [email protected]:orientechnologies/spring-data-orientdb.git
cd spring-data-orientdb
git checkout 6337a3e
mvn clean installmvn clean package spring-boot:runmvn clean test
curl -i -H "Accept: application/json" -X PUT http://localhost:8080/userscurl -i -H "Accept: application/json" -X GET http://localhost:8080/usersYou should get a 401 Unauthorized response status.
curl -i -c cookie.txt -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"username":"[email protected]","password":"123qwe"}' http://localhost:8080/users/authYou should get a 200 OK response status and have a valid cookie stored in cookie.txt.
curl -i -b cookie.txt -H "Accept: application/json" -X GET http://localhost:8080/usersYou should get a 200 OK response status and some JSON representing existing users.
curl -i -b cookie.txt -H "Accept: application/json" -X GET http://localhost:8080/users/do_somethingYou should get a 401 Unauthorized response status.
No open issues yet, or sync has not completed.