@@ -76,11 +76,11 @@ def testAddByAad(self):
76
76
'home_account_id' : "uid.utid" ,
77
77
'realm' : 'contoso' ,
78
78
'secret' : 'an access token' ,
79
- 'target' : 's2 s1 s3' ,
79
+ 'target' : 's1 s2 s3' , # Sorted
80
80
'token_type' : 'some type' ,
81
81
},
82
82
self .cache ._cache ["AccessToken" ].get (
83
- 'uid.utid-login.example.com-accesstoken-my_client_id-contoso-s2 s1 s3' )
83
+ 'uid.utid-login.example.com-accesstoken-my_client_id-contoso-s1 s2 s3' )
84
84
)
85
85
self .assertEqual (
86
86
{
@@ -90,10 +90,10 @@ def testAddByAad(self):
90
90
'home_account_id' : "uid.utid" ,
91
91
'last_modification_time' : '1000' ,
92
92
'secret' : 'a refresh token' ,
93
- 'target' : 's2 s1 s3' ,
93
+ 'target' : 's1 s2 s3' , # Sorted
94
94
},
95
95
self .cache ._cache ["RefreshToken" ].get (
96
- 'uid.utid-login.example.com-refreshtoken-my_client_id--s2 s1 s3' )
96
+ 'uid.utid-login.example.com-refreshtoken-my_client_id--s1 s2 s3' )
97
97
)
98
98
self .assertEqual (
99
99
{
@@ -150,11 +150,11 @@ def testAddByAdfs(self):
150
150
'home_account_id' : "subject" ,
151
151
'realm' : 'adfs' ,
152
152
'secret' : 'an access token' ,
153
- 'target' : 's2 s1 s3' ,
153
+ 'target' : 's1 s2 s3' , # Sorted
154
154
'token_type' : 'some type' ,
155
155
},
156
156
self .cache ._cache ["AccessToken" ].get (
157
- 'subject-fs.msidlab8.com-accesstoken-my_client_id-adfs-s2 s1 s3' )
157
+ 'subject-fs.msidlab8.com-accesstoken-my_client_id-adfs-s1 s2 s3' )
158
158
)
159
159
self .assertEqual (
160
160
{
@@ -164,10 +164,10 @@ def testAddByAdfs(self):
164
164
'home_account_id' : "subject" ,
165
165
'last_modification_time' : "1000" ,
166
166
'secret' : 'a refresh token' ,
167
- 'target' : 's2 s1 s3' ,
167
+ 'target' : 's1 s2 s3' , # Sorted
168
168
},
169
169
self .cache ._cache ["RefreshToken" ].get (
170
- 'subject-fs.msidlab8.com-refreshtoken-my_client_id--s2 s1 s3' )
170
+ 'subject-fs.msidlab8.com-refreshtoken-my_client_id--s1 s2 s3' )
171
171
)
172
172
self .assertEqual (
173
173
{
@@ -214,7 +214,7 @@ def test_key_id_is_also_recorded(self):
214
214
refresh_token = "a refresh token" ),
215
215
}, now = 1000 )
216
216
cached_key_id = self .cache ._cache ["AccessToken" ].get (
217
- 'uid.utid-login.example.com-accesstoken-my_client_id-contoso-s2 s1 s3' ,
217
+ 'uid.utid-login.example.com-accesstoken-my_client_id-contoso-s1 s2 s3' ,
218
218
{}).get ("key_id" )
219
219
self .assertEqual (my_key_id , cached_key_id , "AT should be bound to the key" )
220
220
@@ -229,7 +229,7 @@ def test_refresh_in_should_be_recorded_as_refresh_on(self): # Sounds weird. Yep
229
229
), #refresh_token="a refresh token"),
230
230
}, now = 1000 )
231
231
refresh_on = self .cache ._cache ["AccessToken" ].get (
232
- 'uid.utid-login.example.com-accesstoken-my_client_id-contoso-s2 s1 s3' ,
232
+ 'uid.utid-login.example.com-accesstoken-my_client_id-contoso-s1 s2 s3' ,
233
233
{}).get ("refresh_on" )
234
234
self .assertEqual ("2800" , refresh_on , "Should save refresh_on" )
235
235
0 commit comments