2017-07-26 21:45:26 +00:00
|
|
|
Feature: User validate first factor
|
|
|
|
|
|
|
|
Scenario: User succeeds first factor
|
|
|
|
Given I visit "https://auth.test.local:8080/"
|
|
|
|
When I set field "username" to "bob"
|
|
|
|
And I set field "password" to "password"
|
|
|
|
And I click on "Sign in"
|
|
|
|
Then I'm redirected to "https://auth.test.local:8080/secondfactor"
|
|
|
|
|
|
|
|
Scenario: User fails first factor
|
|
|
|
Given I visit "https://auth.test.local:8080/"
|
|
|
|
When I set field "username" to "john"
|
|
|
|
And I set field "password" to "bad-password"
|
|
|
|
And I click on "Sign in"
|
2017-08-04 19:20:31 +00:00
|
|
|
Then I get a notification of type "error" with message "Authentication failed. Please double check your credentials."
|
2017-07-26 21:45:26 +00:00
|
|
|
|
2017-09-21 20:07:34 +00:00
|
|
|
Scenario: User registers TOTP secret and succeeds authentication
|
2017-07-26 21:45:26 +00:00
|
|
|
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"
|
2017-10-07 11:46:19 +00:00
|
|
|
When I visit "https://admin.test.local:8080/secret.html"
|
|
|
|
And I'm redirected to "https://auth.test.local:8080/?redirect=https%3A%2F%2Fadmin.test.local%3A8080%2Fsecret.html"
|
2017-07-26 21:45:26 +00:00
|
|
|
And I login with user "john" and password "password"
|
|
|
|
And I use "Sec0" as TOTP token handle
|
|
|
|
And I click on "TOTP"
|
2017-09-03 13:22:09 +00:00
|
|
|
Then I'm redirected to "https://admin.test.local:8080/secret.html"
|
2017-07-26 21:45:26 +00:00
|
|
|
|
|
|
|
Scenario: User fails TOTP second factor
|
2017-10-07 11:46:19 +00:00
|
|
|
When I visit "https://admin.test.local:8080/secret.html"
|
|
|
|
And I'm redirected to "https://auth.test.local:8080/?redirect=https%3A%2F%2Fadmin.test.local%3A8080%2Fsecret.html"
|
2017-09-02 23:25:43 +00:00
|
|
|
And I login with user "john" and password "password"
|
2017-07-26 21:45:26 +00:00
|
|
|
And I use "BADTOKEN" as TOTP token
|
|
|
|
And I click on "TOTP"
|
2017-08-04 19:20:31 +00:00
|
|
|
Then I get a notification of type "error" with message "Problem with TOTP validation."
|
2017-07-26 21:45:26 +00:00
|
|
|
|
2017-09-21 20:07:34 +00:00
|
|
|
Scenario: Logout redirects user to redirect URL given in parameter
|
2017-09-03 13:22:09 +00:00
|
|
|
When I visit "https://auth.test.local:8080/logout?redirect=https://home.test.local:8080/"
|
|
|
|
Then I'm redirected to "https://home.test.local:8080/"
|