Erik Cederstrand

Results 206 comments of Erik Cederstrand

Closing. Feel free to reopen if you get time to collect the additional information.

Setting the protocol explicitly in daemon.json fixed this for us: ```json { "insecure-registries": [ "http://my-registry.nexus.internal:1234" ] } ```

I found out how to do this in #38 which also adds fixes to make it work. See https://github.com/opus-42/superset-api-client/blob/534a1e4ca83c5ab48475e2c94fdd310de65fa7ea/tests/integration/test_basic.py#L424 for an example.

@ljpeters If you merge the latest develop into this branch, then there's now a full test suite you can add test cases to, with lots of examples on how to...

The general idea is to override the `.refresh()` method and implement your own token refresh code. See https://ecederstrand.github.io/exchangelib/#oauth-authentication ```python class MsalCredentials(OAuth2AuthorizationCodeCredentials): def refresh(self): # Add actual code here to get...

Ah, that makes sense. Would it help if we changed [this code](https://github.com/ecederstrand/exchangelib/blob/8f6ced514384d612aa9d14250dff4bade443a34b/exchangelib/protocol.py#L330), so it checks whether the `Credentials` object already has an `access_token` set and then avoid calling `session.fetch_token()`? Something...

Ok, so just creating a credentials like this works for you without any patches to exchangelib? ```python credentials = MSALCredentials( access_token=OAuth2Token({'access_token': get_msal_token()}) ) ```

Great! If you can collect the minimal code needed to get a token from msal to use when creating an `OAuth2AuthorizationCodeCredentials` instance, then I'll add that to the docs.

I finally got some time to look into this today, and got it to work. There are many different flows possible with MSAL, but I opted for a version that...