Skip to content
This repository was archived by the owner on Jun 2, 2023. It is now read-only.

Commit cde132d

Browse files
committed
typos; bump versions
1 parent bd71c8a commit cde132d

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ ok
9999
Two transport types are available: Cookies and Headers.
100100

101101
### <a name="cookies"></a>Why would I use Cookies?
102-
Using Cookies to send session data has the advantage that is is handled automatically by client applications, like a web browser.
102+
Using Cookies to send session data has the advantage that it is handled automatically by client applications, like a web browser.
103103
Also Cookies do not require you to implement a storage, since it's built-in into the browser already.
104104

105105
The [Cookie transport example](https://github.com/softwaremill/akka-http-session-faq/tree/master/src/main/java/session/transport/CookieTransport.java) shows a typical setup for Cookies. Below is a sample use case:
@@ -128,7 +128,7 @@ Content-Length: 2
128128
129129
ok
130130
```
131-
The response tells us to set the `_sesiondata` Cookie.
131+
The response tells us to set the `_sessiondata` Cookie.
132132
```
133133
$ curl -i --cookie "_sessiondata=625617AD3A82A95149B2DAAA6B4444F633F298E5-1505374699373-xmy_login" http://localhost:8080/api/current_login
134134
@@ -691,7 +691,7 @@ my_login
691691
### What is it and (when) do I need it?
692692
A CSRF attack is an attack, which tries to re-use a valid cookie to issue a request on your behalf.
693693
In short, you login to your bank account. A session Cookie is sent back to you.
694-
Now with every request to the bank's site, the Cookie is send by the browser.
694+
Now with every request to the bank's site, the Cookie is sent by the browser.
695695
If you open a new tab in your browser and navigate to a malicious web site you may find a prepared link.
696696
Clicking on that link will do a POST request to your bank's site.
697697
Since it is the bank's site, the session Cookie you received from your bank is also sent, hence the request is authorized.
@@ -752,7 +752,7 @@ ok
752752
```
753753
Notice we received a new `XSRF-TOKEN` value.
754754
This is achieved by the `setNewCsrfToken` directive.
755-
This is recommended to prevent a (session fixation attack)[https://security.stackexchange.com/questions/22903/why-refresh-csrf-token-per-form-request].
755+
This is recommended to prevent a [session fixation attack](https://security.stackexchange.com/questions/22903/why-refresh-csrf-token-per-form-request).
756756
Now we can access the `/api/do_logout` endpoint:
757757
```
758758
$ curl -i -X POST --cookie "_sessiondata=5DEF1181A728E6C1724D263B23A8ABAF859046A8-1506081618995-xmy_login;XSRF-TOKEN=mm10u06r81ltjqf7c62c0pn0pc7opssl7gm2ucckom5e4mp0gjsvhn8pa8vr8ula" -H "X-XSRF-TOKEN: mm10u06r81ltjqf7c62c0pn0pc7opssl7gm2ucckom5e4mp0gjsvhn8pa8vr8ula" http://localhost:8080/api/do_logout

build.gradle

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ repositories {
1010
mavenCentral()
1111
}
1212

13-
def akkaHttpV = '10.0.9'
14-
def akkaHttpSessionV = '0.5.3'
13+
def akkaV = '2.5.19'
14+
def akkaHttpV = '10.1.8'
15+
def akkaHttpSessionV = '0.5.11'
1516

1617
dependencies {
18+
compile "com.typesafe.akka:akka-actor_2.11:$akkaV"
19+
compile "com.typesafe.akka:akka-stream_2.11:$akkaV"
1720
compile "com.typesafe.akka:akka-http_2.11:$akkaHttpV"
1821
compile "com.softwaremill.akka-http-session:core_2.11:$akkaHttpSessionV"
1922
compile "com.softwaremill.akka-http-session:jwt_2.11:$akkaHttpSessionV"

0 commit comments

Comments
 (0)