2017-09-03 20:02:38 +07:00
|
|
|
Feature: User is correctly redirected
|
2017-07-27 04:45:26 +07:00
|
|
|
|
2017-08-03 05:30:41 +07:00
|
|
|
Scenario: User is redirected to authelia when he is not authenticated
|
2017-07-27 04:45:26 +07: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-09-22 03:07:34 +07:00
|
|
|
@need-registered-user-john
|
2017-08-03 05:30:41 +07:00
|
|
|
Scenario: User is redirected to home page after several authentication tries
|
2017-09-22 03:07:34 +07:00
|
|
|
When I visit "https://public.test.local:8080/secret.html"
|
|
|
|
And I login with user "john" and password "badpassword"
|
2017-08-03 05:30:41 +07:00
|
|
|
And I clear field "username"
|
|
|
|
And I login with user "john" and password "password"
|
2017-09-22 03:07:34 +07:00
|
|
|
And I use "REGISTERED" as TOTP token handle
|
2017-08-03 05:30:41 +07:00
|
|
|
And I click on "TOTP"
|
|
|
|
Then I'm redirected to "https://public.test.local:8080/secret.html"
|
|
|
|
|
2017-09-22 03:07:34 +07:00
|
|
|
Scenario: User Harry does not have access to https://secret.test.local:8080/secret.html and thus he must get an error 403
|
2017-08-03 05:30:41 +07:00
|
|
|
When I register TOTP and login with user "harry" and password "password"
|
|
|
|
And I visit "https://secret.test.local:8080/secret.html"
|
2017-09-22 22:53:18 +07:00
|
|
|
Then I get an error 403
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Scenario: Redirection URL is propagated from restricted page to first factor
|
|
|
|
When I visit "https://public.test.local:8080/secret.html"
|
|
|
|
Then I'm redirected to "https://auth.test.local:8080/?redirect=https%3A%2F%2Fpublic.test.local%3A8080%2Fsecret.html"
|
|
|
|
|
|
|
|
Scenario: Redirection URL is propagated from first factor to second factor
|
|
|
|
Given I visit "https://auth.test.local:8080/"
|
|
|
|
And I login with user "john" and password "password"
|
|
|
|
And I register a TOTP secret called "Sec0"
|
|
|
|
When I visit "https://public.test.local:8080/secret.html"
|
|
|
|
And I login with user "john" and password "password"
|
|
|
|
Then I'm redirected to "https://auth.test.local:8080/secondfactor?redirect=https%3A%2F%2Fpublic.test.local%3A8080%2Fsecret.html"
|
|
|
|
|
|
|
|
Scenario: Redirection URL is used to send user from second factor to target page
|
|
|
|
Given I visit "https://auth.test.local:8080/"
|
|
|
|
And I login with user "john" and password "password"
|
|
|
|
And I register a TOTP secret called "Sec0"
|
|
|
|
When I visit "https://public.test.local:8080/secret.html"
|
|
|
|
And I login with user "john" and password "password"
|
|
|
|
And I use "Sec0" as TOTP token handle
|
|
|
|
And I click on "TOTP"
|
2017-09-22 03:07:34 +07:00
|
|
|
Then I'm redirected to "https://public.test.local:8080/secret.html"
|