Implemented a simple UserIdSource, that stores the user in a cookie part-03
authorKai Moritz <kai@juplo.de>
Mon, 25 Jan 2016 01:01:28 +0000 (02:01 +0100)
committerKai Moritz <kai@juplo.de>
Sat, 30 Jan 2016 14:01:07 +0000 (15:01 +0100)
commit02f599692669d48f9865764fda994ad61d203ffb
tree57b08be0f023b08678a2950cc1f52f71d42551c2
parent931f5c9b9a43acb81775e995a613bd0c5b8aab52
Implemented a simple UserIdSource, that stores the user in a cookie

This concept was borrowed from the official example "Spring Social Canvas".

The idea to store the internal user-id in a cookie and later load the data
of the user according to the cookie is inherent insecure and must not be
used in a production environment.

One simply can use Spring-Security instead - we will show how to switch in
a later example.

This implementation was choosen only for educational purposes, because it
clarifys the design of Spring Social.
src/main/java/de/juplo/yourshouter/AnonymousUserIdSource.java [deleted file]
src/main/java/de/juplo/yourshouter/ProviderUserIdConnectionSignUp.java [new file with mode: 0644]
src/main/java/de/juplo/yourshouter/SecurityContext.java [new file with mode: 0644]
src/main/java/de/juplo/yourshouter/SecurityContextUserIdSource.java [new file with mode: 0644]
src/main/java/de/juplo/yourshouter/SocialConfig.java
src/main/java/de/juplo/yourshouter/UserCookieGenerator.java [new file with mode: 0644]
src/main/java/de/juplo/yourshouter/UserCookieInterceptor.java [new file with mode: 0644]
src/main/java/de/juplo/yourshouter/WebMvcConfig.java [new file with mode: 0644]