[英]Jwt authentication in php
On an app for user generated content that has a mobile and web version, if the app users two versions of the same backend php code, one version for the mobile and another version for the web which has jwt security implemented on (addressing of endpoints will根據每個后端代碼庫所在的目錄而有所不同,並且網絡的后端有一個 /jwt/ 目錄)。
從 web 或移動設備完成時,這將如何影響用戶上傳,web 和移動設備如何成功獲取通過 web 或移動設備上傳的用戶上傳文件?
這會在移動設備和 web 上的顯示上產生問題嗎?
如果上面的問題是肯定的,你會怎么解決呢?
JWT- JSON Web 簽名是一種加密機制,旨在使用令牌內容獨有的數字簽名來保護數據,以便我們能夠確定令牌的數據是否已被篡改。
智威湯遜的優勢-
eg- eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0MTY5MjkxMDksImp0aSI6ImFhN2Y4ZDBhOTVjIiwic2NvcGVzIjpbInJlcG8iLCJwdWJsaWNfcmVwbyJdfQ.XCEwpBGvOLma4TCOH36HEUHC17
庫 - composer 需要 firebase/php-jwt:dev-master composer 需要 zendframework/zend-config:~2.3 composer 需要 zendframework/zend-http:~2.3
Code-
<?php
/*
代碼在這里... */
/*
/*
$unencodedArray = ['jwt' => $jwt]; 回聲 json_encode($unencodedArray);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.