Skip to content

Example how to secure Spring Boot REST application against csrf withoung using session

Notifications You must be signed in to change notification settings

show123456/CsrfRestExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CsrfRestExample

Example how to secure Spring Boot REST application against csrf without using session.

TokenRepository is implemented as Map and Spring security is instructed to use this TokenRepository instead of default HttpSessionCsrfTokenRepository.

GET /info

unauthorized access to info resoucre

GET /login

authorized resource that returns also csrf_token token in headers

PUT /info

authorized access to resource that can be accessed only with correct csrf_token

About

Example how to secure Spring Boot REST application against csrf withoung using session

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published