Skip to content

Commit

Permalink
Merge pull request #448 from aogail/bugfix/universalPromptStepUp
Browse files Browse the repository at this point in the history
Add sessionToken to dict where step-up code expects it
  • Loading branch information
epierce authored Feb 12, 2024
2 parents 15f8420 + e42f409 commit 0c61553
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion gimme_aws_creds/duo_universal.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def do_auth(self):
"username": okta_profile_login,
"session": self.session.cookies['sid'],
"device_token": self.session.cookies['DT']
}
},
'sessionToken': self.session.cookies['sid']
},
}

Expand Down
11 changes: 7 additions & 4 deletions tests/test_duo_universal_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import requests
import responses
from tests import read_fixture

from gimme_aws_creds.duo_universal import OktaDuoUniversal
from tests import read_fixture
from tests.user_interface_mock import MockUserInterface


Expand Down Expand Up @@ -135,7 +135,8 @@ def test_universal_push(self):
'username': self.OKTA_LOGIN,
'session': self.OKTA_SID_VALUE,
'device_token': self.OKTA_DT_VALUE
}
},
'sessionToken': 'oktasidvalue',
},
}

Expand All @@ -157,7 +158,8 @@ def test_universal_phone_call(self):
'username': self.OKTA_LOGIN,
'session': self.OKTA_SID_VALUE,
'device_token': self.OKTA_DT_VALUE
}
},
'sessionToken': 'oktasidvalue',
},
}

Expand All @@ -180,7 +182,8 @@ def test_universal_passcode(self):
'username': self.OKTA_LOGIN,
'session': self.OKTA_SID_VALUE,
'device_token': self.OKTA_DT_VALUE
}
},
'sessionToken': 'oktasidvalue',
},
}

Expand Down

0 comments on commit 0c61553

Please sign in to comment.