NabuCasa / pycognito

Python library for using AWS Cognito. With support for SRP.
Apache License 2.0
129 stars 39 forks source link

Allow passing through endpoint_url, use_ssl and verify to botoclient #173

Closed Amejonah1200 closed 1 year ago

Amejonah1200 commented 1 year ago

In some implementations of logins are proxying calls through their own systems. Botoclient has a endpoint_url parameter, but pycognito doesn't allow to pass it. Also, when using this lib from an internal corporate network, the ssl fails as there is one self signed cert in the chain, I would like to be able to configure those.

RequestSrpAuth should have it and Cognito, which takes it and packs in kwargs for boto client.

nk9 commented 1 year ago

It would be helpful if you could submit a PR or, at the least, explain exactly which pycognito methods you would like to call with these additional arguments.

Amejonah1200 commented 1 year ago

https://github.com/pvizeli/pycognito/blob/67663552bf1b926f37794822b8467ad5aded6f41/pycognito/__init__.py#L200-L203 These 2 clients have these 3 additional parameters.Cognito and RequestsSrpAuth could accept these and pass through: https://github.com/pvizeli/pycognito/blob/67663552bf1b926f37794822b8467ad5aded6f41/pycognito/__init__.py#L145 https://github.com/pvizeli/pycognito/blob/67663552bf1b926f37794822b8467ad5aded6f41/pycognito/utils.py#L37 I could try to make a PR when I have enough free time at hand.

nk9 commented 1 year ago

Released in 2022.11.2.