简体   繁体   English

如何正确保护我的REST-API

[英]How to correctly secure my REST-API

I am developing an android application and using firebase for the authentication. 我正在开发一个android应用程序,并使用firebase进行身份验证。 When a user signs up or logs in, I save the uid generated by firebase on my DB through my API which is built using laravel framework. 当用户注册或登录时,我通过使用laravel框架构建的API将Firebase生成的uid保存到数据库中。 How exactly do I go about protecting my API endpoints as authentication is not carried out through the API but with firebase? 由于身份验证不是通过API而是通过Firebase进行的,我该如何保护我的API端点? Thanks 谢谢

即使您的身份验证是由Firebase完成的,您也只需阻止对API的未经身份验证的请求得到响应,而这完全在您的API上完成,一旦用户通过Firebase进行身份验证,您就可以处理对API的所有控制权,否则返回到Firebase进行身份验证。

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

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