File tree Expand file tree Collapse file tree
lib/private/Files/Storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,21 +201,22 @@ protected function init(): void {
201201 }
202202 $ this ->ready = true ;
203203
204+ // For Basic auth, the share token is kept as the user name
205+ $ token = $ this ->user ;
204206 // If using Bearer auth, use stored access token or exchange refresh token for access token
205- $ userName = $ this ->user ;
206207 if ($ this ->authType !== null && ($ this ->authType & BearerAuthAwareSabreClient::AUTH_BEARER )) {
207208 // Check if we already have an access token stored (password field)
208209 if (!empty ($ this ->password )) {
209- $ userName = $ this ->password ;
210+ $ token = $ this ->password ;
210211 } else {
211- $ userName = $ this ->exchangeRefreshToken ();
212+ $ token = $ this ->exchangeRefreshToken ();
212213 }
213- $ this ->bearerToken = $ userName ;
214+ $ this ->bearerToken = $ token ;
214215 }
215216
216217 $ settings = [
217218 'baseUri ' => $ this ->createBaseUri (),
218- 'userName ' => $ userName ,
219+ 'userName ' => $ this -> user ,
219220 'password ' => $ this ->password ,
220221 ];
221222 if ($ this ->authType !== null ) {
You can’t perform that action at this time.
0 commit comments