From 61a2586aedb1593f96e03807134fd8cc41cf7d45 Mon Sep 17 00:00:00 2001 From: Stefan Kohler Date: Tue, 20 Jan 2015 16:31:56 +0100 Subject: [PATCH 1/5] Add missing 'an' --- docs/src/docs/asciidoc/guides/users.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/docs/asciidoc/guides/users.adoc b/docs/src/docs/asciidoc/guides/users.adoc index bdfc482f..3de9c9e0 100644 --- a/docs/src/docs/asciidoc/guides/users.adoc +++ b/docs/src/docs/asciidoc/guides/users.adoc @@ -103,7 +103,7 @@ include::{samples-dir}users/src/main/java/sample/UserAccountsFilter.java[tags=ad ---- <1> We have an existing variable named `unauthenticatedAlias`. -The value is an alias that points to existing unauthenticated session. +The value is an alias that points to an existing unauthenticated session. If no such session exists, the value is null. This ensures if we have an existing unauthenticated session that we use it instead of creating a new session. <2> If all of our sessions are already associated to a user, we create a new session alias. @@ -150,4 +150,4 @@ will output a link of: Link ---- -end::how-does-it-work[] \ No newline at end of file +end::how-does-it-work[] From d4d8a4e6c974420d9343023d15492d8fdbc4fc37 Mon Sep 17 00:00:00 2001 From: Stefan Kohler Date: Tue, 20 Jan 2015 16:34:15 +0100 Subject: [PATCH 2/5] Reword after a word too much was found Removed 'a' after the if and reworded sentence --- docs/src/docs/asciidoc/guides/users.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/docs/asciidoc/guides/users.adoc b/docs/src/docs/asciidoc/guides/users.adoc index 3de9c9e0..bfed16a6 100644 --- a/docs/src/docs/asciidoc/guides/users.adoc +++ b/docs/src/docs/asciidoc/guides/users.adoc @@ -107,7 +107,7 @@ The value is an alias that points to an existing unauthenticated session. If no such session exists, the value is null. This ensures if we have an existing unauthenticated session that we use it instead of creating a new session. <2> If all of our sessions are already associated to a user, we create a new session alias. -<3> If a there exists a session that is not associated to a user, we use its session alias. +<3> If there is an existing session that is not associated to a user, we use its session alias. <4> Finally, we create the add account URL. The URL contains a session alias that either points to an existing unauthenticated session or is an alias that is unused thus signaling to create a new session associated to that alias. From 4926606841ddef63eb1b23d737d571a9b921b791 Mon Sep 17 00:00:00 2001 From: Stefan Kohler Date: Tue, 20 Jan 2015 16:40:30 +0100 Subject: [PATCH 3/5] Remove arbitrary verb --- docs/src/docs/asciidoc/index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/docs/asciidoc/index.adoc b/docs/src/docs/asciidoc/index.adoc index d068bf4a..d3582478 100644 --- a/docs/src/docs/asciidoc/index.adoc +++ b/docs/src/docs/asciidoc/index.adoc @@ -161,7 +161,7 @@ include::guides/users.adoc[tags=how-does-it-work,leveloffset=+1] [[httpsession-rest]] === HttpSession & RESTful APIs -Spring Session has can work with RESTful APIs by allowing the session to be provided in a header. +Spring Session can work with RESTful APIs by allowing the session to be provided in a header. NOTE: The <> provides a working sample on how to use Spring Session in a REST application to support authenticating with a header. From 8dd885a6c7edd34f659e759cd5e2f646f4ac1544 Mon Sep 17 00:00:00 2001 From: Stefan Kohler Date: Tue, 20 Jan 2015 16:41:50 +0100 Subject: [PATCH 4/5] Add missing verb in note in the RESTful guide --- docs/src/docs/asciidoc/index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/docs/asciidoc/index.adoc b/docs/src/docs/asciidoc/index.adoc index d3582478..ddcb4314 100644 --- a/docs/src/docs/asciidoc/index.adoc +++ b/docs/src/docs/asciidoc/index.adoc @@ -87,7 +87,7 @@ We have already mentioned that Spring Session provides transparent integration w Using Spring Session with `HttpSession` is enabled by adding a Servlet Filter before anything that uses the `HttpSession`. NOTE: The <> provides a working sample on how to integrate Spring Session and `HttpSession`. -You can the basic steps for integration below, but you are encouraged to follow along with the detailed HttpSession Guide when integrating with your own application. +You can read the basic steps for integration below, but you are encouraged to follow along with the detailed HttpSession Guide when integrating with your own application. include::guides/httpsession.adoc[tags=config,leveloffset=+2] From 0ac460563f1ba3bf9b5011a27100d44a5100b41b Mon Sep 17 00:00:00 2001 From: Stefan Kohler Date: Tue, 20 Jan 2015 17:03:22 +0100 Subject: [PATCH 5/5] Make 'Filter' look more code-like --- docs/src/docs/asciidoc/guides/rest.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/docs/asciidoc/guides/rest.adoc b/docs/src/docs/asciidoc/guides/rest.adoc index 4daa4999..d69cd5e2 100644 --- a/docs/src/docs/asciidoc/guides/rest.adoc +++ b/docs/src/docs/asciidoc/guides/rest.adoc @@ -80,7 +80,7 @@ include::{samples-dir}rest/src/main/java/sample/HttpSessionConfig.java[] <1> We import an embedded Redis Server so that there is no need to start up Redis external of our application. In a production application this is not necessary since we would point our connection to an external Redis instance. -<2> The `@EnableRedisHttpSession` annotation creates a Spring Bean with the name of `springSessionRepositoryFilter` that implements Filter. +<2> The `@EnableRedisHttpSession` annotation creates a Spring Bean with the name of `springSessionRepositoryFilter` that implements `Filter`. The filter is what is in charge of replacing the `HttpSession` implementation to be backed by Spring Session. In this instance Spring Session is backed by Redis. <3> We create a `RedisConnectionFactory` that connects Spring Session to the Redis Server. @@ -205,4 +205,4 @@ Alternatively, you can also delete the explicit key. Enter the following into yo We can now use the *x-auth-token* to make another request with the session we deleted and observe we are prompted for a authentication. For example, the following returns an HTTP 401: - $ curl -v http://localhost:8080/ -H "x-auth-token: 0dc1f6e1-c7f1-41ac-8ce2-32b6b3e57aa3" \ No newline at end of file + $ curl -v http://localhost:8080/ -H "x-auth-token: 0dc1f6e1-c7f1-41ac-8ce2-32b6b3e57aa3"