2017-10-09 05:28:46 +07: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-11-03 03:34:07 +07: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 . e x a m p l e . c o m : 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 : / / l o g i n . e x a m p l e . c o m : 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 . e x a m p l e . c o m % 3 A 8 0 8 0 % 2 F s e c r e t . h t m l "
2017-10-09 05:28:46 +07: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-11-03 03:34:07 +07: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 . e x a m p l e . c o m : 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 : / / p u b l i c . e x a m p l e . c o m : 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 : / / l o g i n . e x a m p l e . c o m : 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 . e x a m p l e . c o m % 3 A 8 0 8 0 % 2 F s e c r e t . h t m l "
2017-10-09 05:28:46 +07:00
@need-registered-user-john
2017-10-18 04:24:02 +07: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-11-03 03:34:07 +07:00
When I v i s i t " h t t p s : / / p u b l i c . e x a m p l e . c o m : 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 : / / l o g i n . e x a m p l e . c o m : 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 . e x a m p l e . c o m % 3 A 8 0 8 0 % 2 F s e c r e t . h t m l "
2017-10-09 05:28:46 +07: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 "
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
2017-10-22 06:23:26 +07:00
And I c l i c k o n " S i g n i n "
2017-11-03 03:34:07 +07:00
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 . e x a m p l e . c o m : 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 : / / l o g i n . e x a m p l e . c o m : 8 0 8 0 "
Then I ' m r e d i r e c t e d t o " h t t p s : / / l o g i n . e x a m p l e . c o m : 8 0 8 0 / l o g g e d i n "
2017-10-18 04:24:02 +07:00
And I s l e e p f o r 5 s e c o n d s
2017-11-03 03:34:07 +07:00
And I ' m r e d i r e c t e d t o " h t t p s : / / h o m e . e x a m p l e . c o m : 8 0 8 0 / "
2017-10-09 05:28:46 +07: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
2017-11-03 03:34:07 +07:00
When I v i s i t " h t t p s : / / p u b l i c . e x a m p l e . c o m : 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 : / / l o g i n . e x a m p l e . c o m : 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 . e x a m p l e . c o m % 3 A 8 0 8 0 % 2 F s e c r e t . h t m l "
2017-10-09 05:28:46 +07: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 "
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
2017-10-22 06:23:26 +07:00
And I c l i c k o n " S i g n i n "
2017-11-03 03:34:07 +07:00
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 . e x a m p l e . c o m : 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 : / / l o g i n . e x a m p l e . c o m : 8 0 8 0 ? r e d i r e c t = h t t p s : / / p u b l i c . e x a m p l e . c o m : 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 : / / p u b l i c . e x a m p l e . c o m : 8 0 8 0 / s e c r e t . h t m l "