summaryrefslogtreecommitdiff
path: root/spring-boot/08-spring-security-simple/README
diff options
context:
space:
mode:
Diffstat (limited to 'spring-boot/08-spring-security-simple/README')
-rw-r--r--spring-boot/08-spring-security-simple/README19
1 files changed, 19 insertions, 0 deletions
diff --git a/spring-boot/08-spring-security-simple/README b/spring-boot/08-spring-security-simple/README
new file mode 100644
index 0000000..b0fab0c
--- /dev/null
+++ b/spring-boot/08-spring-security-simple/README
@@ -0,0 +1,19 @@
+This sample project shows how to add Spring Security to a Spring Boot application.
+
+To run with support for hot swap during development, use the dev profile as follows:
+
+ mvn spring-boot:run -Dspring-boot.run.profiles=dev
+
+Two dependencies have been added to pom.xml.
+
+After starting the application, look for the default password that appears on the console.
+
+The default user name is 'user' without quotes.
+
+Access the Contact page from a web browser and observe that a CSRF token has got added to the form html automatically.
+
+The application has been modified to show a logout link in the main navigation bar.
+
+Check how that link has been added in the main.html file where the link is visible only if the user has logged in.
+
+Since all pages of the application are secured (except the login page), the logout link could have been displayed without using the sec:authorize attribute. It has been used in the web page just to show the capability. It is useful in cases where some pages are shown to unauthenticated users. \ No newline at end of file