Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more.
0

SSL requests and more with CircuitPython and PyPortal
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

SSL requests and more with CircuitPython and PyPortal

by morgab on Mon Mar 02, 2020 6:57 am

I'm currently evaluating CircuitPython and PyPortal. I have no previous experience with CircuitPython, PyPortal or even Python.

Can the following be achieved with CircuiPython and PyPortal?
- Secure communication through SSL requests (GET, POST etc.)? How are certificates stored on the device?
- Authenticate (sign in) to Azure AD via device code flow? The device code authentication flow is explained in Azure documentation as letting the device display a user code which the user then types into a browser on another device, which lets the user sign in and consent with a Office 365 or Microsoft account. As long as SSL requests are possible, I think this is achievable.
- Can a browser be displayed on the device?

Thanks.

morgab
 
Posts: 3
Joined: Thu Feb 13, 2020 9:44 am

Re: SSL requests and more with CircuitPython and PyPortal

by tannewt on Mon Mar 02, 2020 8:43 pm

Yes, SSL is supported by the ESP32 module. Certificates are stored within the module.

I'm not sure of the Azure authentication flow but there is this example code for working with Azure from the PyPortal: https://learn.adafruit.com/using-micros ... cuitpython

No, a browser cannot be displayed by the device because no browser is implemented on CircuitPython. CircuitPython isn't built on an OS that also has browser support. A Raspberry Pi with Linux can show a browser and use most CircuitPython libraries by using the Blinka library.

tannewt
 
Posts: 1536
Joined: Thu Oct 06, 2016 8:48 pm

Re: SSL requests and more with CircuitPython and PyPortal

by morgab on Tue Mar 03, 2020 7:53 am

Ok. Thanks for tips. I'll look into the Azure example.
As long as SSL requests are supported, I think that authentication flow should be possible, and no browser on the device is needed.

morgab
 
Posts: 3
Joined: Thu Feb 13, 2020 9:44 am

Please be positive and constructive with your questions and comments.