简体   繁体   English

如何使用 Laravel-Lumen 框架检查 azure 令牌(身份验证)

[英]How to check the azure token (authentification) with the Laravel-Lumen framework

here is the architecture of my project: I created an API with lumen and a front with the aurelia framework.这是我的项目的架构:我创建了一个带有 lumen 的 API 和一个带有 aurelia 框架的前端。 The front part communicates with the lumen API Since my front Aurelia, I set up an authentication via a microsoft azure account.前面部分与lumen API 通信从我前面的Aurelia 开始,我通过一个microsoft azure 帐户设置了身份验证。 It works well, is it returns me well the data expected.它运行良好,是否能很好地返回预期的数据。 The problem is that I want to set up a token check on the API side.问题是我想在 API 端设置一个令牌检查。 I am therefore looking for a laravel package that allows me to communicate with the idP AZURE to check the token that the front is sending me back.因此,我正在寻找一个 laravel 包,它允许我与 idP AZURE 通信以检查前端发送给我的令牌。 Thank you谢谢

It looks like you're trying to validate the Access token from Azure in your Laurel/Aurelia back-end.您似乎正在尝试在 Laurel/Aurelia 后端验证来自 Azure 的访问令牌。

This article goes over how to utilize the tymon/jwt-auth Laravel package in an Angular JS setting : https://www.toptal.com/web/cookie-free-authentication-with-json-web-tokens-an-example-in-laravel-and-angularjs本文介绍了如何在 Angular JS 设置中使用 tymon/jwt-auth Laravel 包: https ://www.toptal.com/web/cookie-free-authentication-with-json-web-tokens-an-example -in-laravel-and-angularjs

Please refer to the Wiki for JWT-Auth for more self-help documentation in regards to using the library for JWT Signature validation : https://github.com/tymondesigns/jwt-auth/wiki有关使用库进行 JWT 签名验证的更多自助文档,请参阅 JWT-Auth 的 Wiki: https : //github.com/tymondesigns/jwt-auth/wiki

And the docs for JWT-auth can be found here : https://jwt-auth.readthedocs.io/en/develop/ JWT-auth 的文档可以在这里找到: https : //jwt-auth.readthedocs.io/en/develop/

You can validate the signature for the JWT Token using this library.您可以使用此库验证 JWT 令牌的签名。 Microsoft's docs explains further how to validate tokens from Azure Active Directory: https://docs.microsoft.com/en-us/azure/active-directory/develop/access-tokens#validating-tokens Microsoft 的文档进一步解释了如何从 Azure Active Directory 验证令牌: https : //docs.microsoft.com/en-us/azure/active-directory/develop/access-tokens#validating-tokens

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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