GithubHelp home page GithubHelp logo

Comments (3)

ly-dev avatar ly-dev commented on July 20, 2024 1

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.

ac1982 avatar ac1982 commented on July 20, 2024

最近遇到个跟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.

ac1982 avatar ac1982 commented on July 20, 2024

重新改进了逻辑,只在没有Token的情况下进行OAuth,这样避免每次都重签Token。

from blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.