简体   繁体   中英

How to test Azure Functions Authentication locally

Can someone please point me to the right direction with this; I have setup Azure Functions Authentications, it works fine when I deploy my function to Azure but locally the token is not validated hence the I can't retrieve the authenticated user. I am using Microsoft and Facebook authentications as well as a custom Authentication method, all working fine on Azure but locally none of them work!

I found this article which explains how it is done for Azure Mobile Apps however it seems that the method provided is not going to be possible for Functions.

Unfortunately, according to the How can we improve Microsoft Azure Functions? issue opened on Azure 's feedback site, it seems that the functionality you require is currently not supported, but they are "looking into" it.

To work with the function locally, you'll probably need to mock the principal in some way.

Hope it helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM