Comments (3)
Bearer请求令牌,相当于Password,不应该被Server明文存储,所以你只有每次创建Toaken可以得到。当然API消费方可以存储这个令牌和与之对应的更新令牌。
IMHO, the token in the Bearer header is like the password. The server should not store it. Instead, the server will only store the hashed value of the token. That means there's no way to get it again after the creating request. Of course, the API consumer could store the token and the refresh token for using in the Bearer header.
from blog.
最近遇到个跟Passport有关的问题,暂时还没有找到解决办法,就是如何复用accessToken?
// Creating a token without scopes...
$token = $user->createToken('Token Name')->accessToken;
我现在不得不每次都创建新的然后吊销之前的全部Token.
Retrieving a personal access token after it's been created
有讨论这个问题,但是解决方法并没有拿到我希望的Bearer 请求令牌。
from blog.
重新改进了逻辑,只在没有Token的情况下进行OAuth,这样避免每次都重签Token。
from blog.
Related Issues (20)
- Laravel 中如何更方便的修改 Passport Personal Access Token 过期时间 | overtrue
- 一种 Laravel 异常上下文解决方案 | overtrue HOT 6
- PinYin库升级到4.0后所有拼音里有a的都无法转换!
- 一种 Laravel 中简单设置多态关系模型别名的方式 | overtrue
- 如何在 Ant Design Pro 或 UmiJS 中使用 tailwindcss | overtrue
- 关于 | overtrue HOT 3
- sudo -Hu 执行时找不到命令的问题解决 - overtrue
- PHPCS、PHPMD 的安装与配置 - overtrue HOT 1
- 让你的 Laravel 应用与官方保持同步 - overtrue HOT 8
- npm 代理安装依赖 - overtrue HOT 2
- 又一篇 Deployer 的使用攻略 - overtrue HOT 23
- 我写了一份 PHP 拓展包开发教程 - overtrue HOT 2
- 一种 Laravel 中简单设置多态关系模型别名(Polymorphic Types)的方式 - overtrue
- 如何在 And Design Pro 或 UmiJS 中使用 tailwindcss - overtrue HOT 5
- 我写了一份 PHP 拓展包开发教程 | overtrue
- Laravel 中如何更方便的修改 Passport Personal Access Token 过期时间 | overtrue
- Hello | overtrue
- EasyWeChat 企业微信 HOT 1
- 我所理解的 PHP Trait | overtrue HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blog.