You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -75,24 +77,26 @@ Spring Security interface `SecurityContextRepository`, whose other implementatio
75
77
Of course, it is not mandatory to use Ehcache. Any other caching solution could be used to
76
78
store user credentials in between REST calls.
77
79
80
+
In essence, theHTTP Session has been replaced with an expirable cache. Provided the cache is
81
+
configured correctly, it provides exactly the same semantics as the HTTP Session for storing
82
+
Spring Security authentication tokens, such as, sliding expiration, idle timeout and replication.
83
+
78
84
#4. Running the application
79
85
The following pre-requisites apply to this application.
80
86
81
87
1. Java Development Kit (JDK) 6.0 or higher;
82
88
1. Apache Maven 3.0.4 or higher.
83
89
84
90
Once these have been installed and the code checked out, the `web` application can be run
85
-
as `mvn clean package tomcat7:run -pl common,data,domain,service,transfer,web`. This starts an
86
-
embedded Tomcat instance on local port `8888`. The application can then be accessed using
87
-
any web browser on [http://localhost:8888](http://localhost:8888). When accessed for the first
88
-
time, the application will present a login screen with instructions on logging in.
89
-
Successfully logging in as an *Admin* user provides access to a list of users for the system.
90
-
This functionality is not accessible to normal users (try accessing it as a normal user).
91
-
92
-
Similarly, the `api` application can be run as
93
-
`mvn clean package tomcat7:run -pl api,common,data,domain,service,transfer`. This starts
94
-
an embedded Tomcat instance on local port `9999`. The application can then be accessed
95
-
using a REST client, such as the *Postman* extension for Google Chrome on
91
+
as `mvn clean package tomcat7:run -am -pl web`. This starts an embedded Tomcat instance on
92
+
local port `8888`. The application can then be accessed using any web browser on [http://localhost:8888](http://localhost:8888). When accessed for the first time, the
93
+
application will present a login screen with instructions on logging in. Successfully logging
94
+
in as an *Admin* user provides access to a list of users for the system. This functionality
95
+
is not accessible to normal users (try accessing it as a normal user).
96
+
97
+
Similarly, the `api` application can be run as `mvn clean package tomcat7:run -am -pl api`.
98
+
This starts an embedded Tomcat instance on local port `9999`. The application can then be
99
+
accessed using a REST client, such as the *Postman* extension for Google Chrome on
96
100
`http://localhost:9999`. There are two REST endpoints - `http://localhost:9999/authenticate`
97
101
to authenticate clients and `http://localhost:9999/users` to access the user list.
98
102
First, make a *POST* request to `http://localhost:9999/authenticate` with two form parameters
0 commit comments