drfm55597 2019-06-17 14:33
浏览 124

Laravel应用程序的Azure身份验证中间件

First of all, i am very new to Laravel and Azure and i am not very sure what i am doing.

I want to add Authentication to my Laravel Web Application.

I followed the instructions in this Link to do that:

When i press my Login Button, which leeds me to "/login/azure" i get directed to

https://login.microsoftonline.com/ef7e48cb-7676-47e9-9a28-c69910d92560/oauth2/authorize?response_type=code&client_id=3a0621c0-2848-47f5-83ee-bebeede8aaa6&resource=

I can add my credentials here and then i get redirected to my welcome page and there is a very long code in my uri and after that a short session code. What does this mean? Am i logged in now? How can i test that and how can i create different roles for my Application now?

Could it be that i have to enable the default laravel Authentication with the "php artisan make:auth" command? Is it bad that i have no resource in the uri u see above? What do i have to put there?

  • 写回答

1条回答 默认 最新

  • dongyan0629 2019-06-17 15:15
    关注

    First, understand OAuth on Azure. https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code

    You do not need a resource if you are using the "converged" endpoint (v2). The endpoint you show is v1, so yes, you need to specify what resource you're authenticating against and what granted permissions are for it. Check out What is the Resource parameter in Windows Azure AD tenant application oAuth 2.0 specification

    Have you created an app registration (see the Azure Active Directory blade)?

    Welcome to OAuth.

    评论

报告相同问题?