问题
We are are on the start of our project and want to decide what technologies that Azure provides we can utilize. Firstly we are going to have mobile application and later web application. For both of this we need API. I really don't want to create separate api for mobile and web. That's why I guess we need to have a common base API which mobile and web apps will reference and extend with mobile and web specific logic.
What we want to be common is user database and authentication (social authentication using instagram, username/password etc.), business logic. Azure App Service provides 3 components which potentially fit into this model Azure API App - I assume we could use this as base api Azure Mobile App - Which will be used to extend API app to support mobile specific stuff for instance push notifications. Azure Web App - will be our web application.
The questions I have here are following. First of all only in Mobile App start screen it's explicitly noted that it supports social authentication. In API App it's said that it supports
Secure APIs with Active Directory, single sign-on, and OAuth
In Web App nothing is mentioned regarding authentication. My question is following - can I do all authentication, user management data access and business logic in API App, and use that same logic in web and mobile apps?
回答1:
You can use Azure API apps for authentication. It supports Azure Active Directory, Facebook, Google, Twitter, and Microsoft Account. Please check this link https://azure.microsoft.com/en-in/documentation/articles/app-service-api-authentication/ Your web app can use the API app for authentication.
来源:https://stackoverflow.com/questions/37453155/how-to-combine-azure-appservices-api-mobile-and-web-apps