Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Embedded the security checks inside the HTTP handler base.
- Loading branch information
1 parent
affacdf
commit 6d4735a
Showing
15 changed files
with
201 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
rapidoid-integration-tests/src/test/resources/HttpLoginTest/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
secret: hard-to-guess | ||
|
||
users: | ||
niko: | ||
email: niko@rapidoid.org.abcde | ||
password: easy | ||
roles: | ||
- owner | ||
- administrator | ||
- moderator | ||
|
||
chuck: | ||
password: chuck | ||
roles: ["moderator", "restarter"] | ||
|
||
abc: | ||
password: abc | ||
roles: guest | ||
|
||
foo: | ||
password: bar |
18 changes: 0 additions & 18 deletions
18
rapidoid-integration-tests/src/test/resources/HttpLoginTest/users.yaml
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
...tegration-tests/src/test/resources/test-results/HttpLoginTest/randomUserLogin/GET_profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
HTTP/1.1 403 Forbidden | ||
Connection: keep-alive | ||
Server: Rapidoid | ||
Date: XXXXX GMT | ||
Content-Type: application/json; charset=utf-8 | ||
Content-Length: 64 | ||
|
||
{"error":"The user doesn't have the required roles!","code":403} |
8 changes: 8 additions & 0 deletions
8
...id-integration-tests/src/test/resources/test-results/HttpLoginTest/randomUserLogin/denied
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
HTTP/1.1 403 Forbidden | ||
Connection: keep-alive | ||
Server: Rapidoid | ||
Date: XXXXX GMT | ||
Content-Type: application/json; charset=utf-8 | ||
Content-Length: 64 | ||
|
||
{"error":"The user doesn't have the required roles!","code":403} |
9 changes: 9 additions & 0 deletions
9
...tegration-tests/src/test/resources/test-results/HttpLoginTest/randomUserLogin/granted-abc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
HTTP/1.1 200 OK | ||
Connection: keep-alive | ||
Server: Rapidoid | ||
Date: XXXXX GMT | ||
Content-Type: application/json; charset=utf-8 | ||
Set-Cookie: COOKIEPACK=jbYa2G13kN9Mr$sYj8DtKw==; path=/ | ||
Content-Length: 5 | ||
|
||
"abc" |
9 changes: 9 additions & 0 deletions
9
...gration-tests/src/test/resources/test-results/HttpLoginTest/randomUserLogin/granted-chuck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
HTTP/1.1 200 OK | ||
Connection: keep-alive | ||
Server: Rapidoid | ||
Date: XXXXX GMT | ||
Content-Type: application/json; charset=utf-8 | ||
Set-Cookie: COOKIEPACK=vEQMGrsV$JsjG5PW6ddbgz5I8nCQbj3vl17cbCifBx8=; path=/ | ||
Content-Length: 7 | ||
|
||
"chuck" |
9 changes: 9 additions & 0 deletions
9
...tegration-tests/src/test/resources/test-results/HttpLoginTest/randomUserLogin/granted-foo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
HTTP/1.1 200 OK | ||
Connection: keep-alive | ||
Server: Rapidoid | ||
Date: XXXXX GMT | ||
Content-Type: application/json; charset=utf-8 | ||
Set-Cookie: COOKIEPACK=bhsWehWUPJf1$fqy3ykdFg==; path=/ | ||
Content-Length: 5 | ||
|
||
"foo" |
9 changes: 9 additions & 0 deletions
9
...egration-tests/src/test/resources/test-results/HttpLoginTest/randomUserLogin/granted-niko
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
HTTP/1.1 200 OK | ||
Connection: keep-alive | ||
Server: Rapidoid | ||
Date: XXXXX GMT | ||
Content-Type: application/json; charset=utf-8 | ||
Set-Cookie: COOKIEPACK=mtwtUnzH1IsCSBFMmqyGnpZJW1qgchL$rAovPs9Sn1Y=; path=/ | ||
Content-Length: 6 | ||
|
||
"niko" |
9 changes: 9 additions & 0 deletions
9
...id-integration-tests/src/test/resources/test-results/HttpLoginTest/randomUserLogin/logout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
HTTP/1.1 403 Forbidden | ||
Connection: keep-alive | ||
Server: Rapidoid | ||
Date: XXXXX GMT | ||
Content-Type: application/json; charset=utf-8 | ||
Set-Cookie: COOKIEPACK=; path=/ | ||
Content-Length: 64 | ||
|
||
{"error":"The user doesn't have the required roles!","code":403} |
Oops, something went wrong.