micropython / micropython/micropython-lib

Feature request: support for the HTTP Digest authentication on the requests and/or the aiohttp

Open
#869 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.9k
Forks
1.1k
Avg merge
7d 6h
Merged PRs (30d)
3

Description

Hi all!

I need to communicate with some products that have an API that support only HTTP Digest authentication, I mean, they do not support HTTP Basic authentication and it is not possible to disable the authentication.

I see that MicroPython has two HTTP client libs that can be used for that purpose:

  1. requests (https://github.com/micropython/micropython-lib/tree/master/python-ecosys/requests) - It is sync, and support HTTP Basic authentication, but does not support HTTP Digest authentication
  2. aiohttp (https://github.com/micropython/micropython-lib/tree/master/python-ecosys/aiohttp/aiohttp) - It is async, and does not support HTTP Basic authentication and does not support HTTP Digest authentication as well.

I see there is this uwwwauth.py -> https://github.com/pfalcon/pycopy-lib/blob/master/uwwwauth/uwwwauth.py that is a support for HTTP Digest authentication for the pycopy (It seems to be like as old fork of MicroPython). Can that help to support HTTP Digest authentication on the requests and/or aiohttp http clients?

Is it a simple or difficult task to support HTTP Digest authentication on the MicroPython requests/aiohttp? If I were to choose just one that http client libs to be supported by the HTTP Digest authentication, I would like to be the aiohttp because it is async (asyncio), so I do not need to use threads to have a non blocking code. But if is supported just on the requests lib, is very good as well.

Thank you in advance!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the requests and aiohttp client paths linked in the issue, then compare them with pycopy-lib's uwwwauth.py implementation. Decide whether support targets one or both clients, and consider the work complete when the selected client can communicate with HTTP Digest-only APIs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, authentication, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.