2017-09-03 13:02:38 +00:00
|
|
|
Feature: User is correctly redirected
|
2017-07-26 21:45:26 +00:00
|
|
|
|
2017-08-02 22:30:41 +00:00
|
|
|
Scenario: User is redirected to authelia when he is not authenticated
|
2017-07-26 21:45:26 +00:00
|
|
|
Given I'm on https://home.test.local:8080
|
|
|
|
When I click on the link to secret.test.local
|
|
|
|
Then I'm redirected to "https://auth.test.local:8080/"
|
|
|
|
|
2017-08-02 22:30:41 +00:00
|
|
|
Scenario: User is redirected to home page after several authentication tries
|
|
|
|
Given I'm on https://auth.test.local:8080/
|
|
|
|
And I login with user "john" and password "password"
|
|
|
|
And I register a TOTP secret called "Sec0"
|
|
|
|
And I visit "https://public.test.local:8080/secret.html"
|
|
|
|
When I login with user "john" and password "badpassword"
|
|
|
|
And I clear field "username"
|
|
|
|
And I login with user "john" and password "password"
|
|
|
|
And I use "Sec0" as TOTP token handle
|
|
|
|
And I click on "TOTP"
|
|
|
|
Then I'm redirected to "https://public.test.local:8080/secret.html"
|
|
|
|
|
|
|
|
Scenario: User Harry does not have access to https://secret.test.local:8080/secret.html and thus he must get an error 401
|
|
|
|
When I register TOTP and login with user "harry" and password "password"
|
|
|
|
And I visit "https://secret.test.local:8080/secret.html"
|
|
|
|
Then I get an error 403
|