2017-10-08 22:28:46 +00:00
Feature : User is redirected when factors are already validated
@need-registered-user-john
Scenario : User has validated first factor and tries to access service protected by second factor. He is then redirect to second factor step.
2017-10-19 20:33:10 +00:00
When I v i s i t " h t t p s : / / s i n g l e _ f a c t o r . t e s t . l o c a l : 8 0 8 0 / s e c r e t . h t m l "
And I ' m r e d i r e c t e d t o " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 / ? r e d i r e c t = h t t p s % 3 A % 2 F % 2 F s i n g l e _ f a c t o r . t e s t . l o c a l % 3 A 8 0 8 0 % 2 F s e c r e t . h t m l "
2017-10-08 22:28:46 +00:00
And I l o g i n w i t h u s e r " j o h n " a n d p a s s w o r d " p a s s w o r d "
2017-10-19 20:33:10 +00:00
And I ' m r e d i r e c t e d t o " h t t p s : / / s i n g l e _ f a c t o r . t e s t . l o c a l : 8 0 8 0 / s e c r e t . h t m l "
2017-10-08 22:28:46 +00:00
And I v i s i t " h t t p s : / / p u b l i c . t e s t . l o c a l : 8 0 8 0 / s e c r e t . h t m l "
Then I ' m r e d i r e c t e d t o " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 / s e c o n d f a c t o r ? r e d i r e c t = h t t p s % 3 A % 2 F % 2 F p u b l i c . t e s t . l o c a l % 3 A 8 0 8 0 % 2 F s e c r e t . h t m l "
@need-registered-user-john
2017-10-17 21:24:02 +00:00
Scenario : User who has validated second factor and access auth portal should be redirected to "Already logged in page" and redirected to default URL declared in configuration
2017-10-08 22:28:46 +00:00
When I v i s i t " h t t p s : / / p u b l i c . t e s t . l o c a l : 8 0 8 0 / s e c r e t . h t m l "
And I ' m r e d i r e c t e d t o " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 / ? r e d i r e c t = h t t p s % 3 A % 2 F % 2 F p u b l i c . t e s t . l o c a l % 3 A 8 0 8 0 % 2 F s e c r e t . h t m l "
And I l o g i n w i t h u s e r " j o h n " a n d p a s s w o r d " p a s s w o r d "
And I u s e " R E G I S T E R E D " a s T O T P t o k e n h a n d l e
And I c l i c k o n " T O T P "
And I ' m r e d i r e c t e d t o " h t t p s : / / p u b l i c . t e s t . l o c a l : 8 0 8 0 / s e c r e t . h t m l "
And I v i s i t " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 "
Then I ' m r e d i r e c t e d t o " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 / l o g g e d i n "
2017-10-17 21:24:02 +00:00
And I s l e e p f o r 5 s e c o n d s
And I ' m r e d i r e c t e d t o " h t t p s : / / h o m e . t e s t . l o c a l : 8 0 8 0 / "
2017-10-08 22:28:46 +00:00
@need-registered-user-john
Scenario : User who has validated second factor and access auth portal with rediction param should be redirected to that URL
When I v i s i t " h t t p s : / / p u b l i c . t e s t . l o c a l : 8 0 8 0 / s e c r e t . h t m l "
And I ' m r e d i r e c t e d t o " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 / ? r e d i r e c t = h t t p s % 3 A % 2 F % 2 F p u b l i c . t e s t . l o c a l % 3 A 8 0 8 0 % 2 F s e c r e t . h t m l "
And I l o g i n w i t h u s e r " j o h n " a n d p a s s w o r d " p a s s w o r d "
And I u s e " R E G I S T E R E D " a s T O T P t o k e n h a n d l e
And I c l i c k o n " T O T P "
And I ' m r e d i r e c t e d t o " h t t p s : / / p u b l i c . t e s t . l o c a l : 8 0 8 0 / s e c r e t . h t m l "
And I v i s i t " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 ? r e d i r e c t = h t t p s : / / p u b l i c . t e s t . l o c a l : 8 0 8 0 / s e c r e t . h t m l "
2017-10-19 20:33:10 +00:00
Then I ' m r e d i r e c t e d t o " h t t p s : / / p u b l i c . t e s t . l o c a l : 8 0 8 0 / s e c r e t . h t m l "