不明白 token_type 等于 Bearer 的作用
对于
return $this->response->array([
'access_token' => $token,
'token_type' => 'Bearer',
'expires_in' => Auth::guard('api')->factory()->getTTL() * 60
]);
中的 'token_type' => 'Bearer' 不是很明白为什么要加这个键值对,不知道作者能不能对这些 Authorization 的 type 值做个大致的解释.
谢谢.
关于 LearnKu
https://security.stackexchange.com/questio...
大概是个规范,为了说明是个 Bearer token 。 你指的是 postman 提供的 type 类型?它只是帮助你简化传值,要明白为什么还得看文档啊 ,比如 oauth 的 和 亚马逊的