Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sessionToken to dict where step-up code expects it #448

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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