Code Monkey home page Code Monkey logo

Comments (12)

AlmogBaku avatar AlmogBaku commented on June 14, 2024 6

Why doesn't https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/tree/feature/client-on-token merged to the master?

from fosoauthserverbundle.

GuilhemN avatar GuilhemN commented on June 14, 2024 1

Done :)

from fosoauthserverbundle.

pierrre avatar pierrre commented on June 14, 2024

Can I send a pull request?

from fosoauthserverbundle.

adrienbrault avatar adrienbrault commented on June 14, 2024

@pierre Why don't you "just" do this :

$token = $securityContext->getToken()->getToken();
$accessToken = $accessTokenManager->findTokenBy(array('token' => $token));
$client = $accessToken->getClient();

from fosoauthserverbundle.

pierrre avatar pierrre commented on June 14, 2024

It does 1 additional request in the database:

$accessToken = $accessTokenManager->findTokenBy(array('token' => $token));
Is useless if we set the client in FOS\OAuthServerBundle\Security\Authentication\Token\OAuthToken

from fosoauthserverbundle.

willdurand avatar willdurand commented on June 14, 2024

Yes, why not. I think it can be useful.

from fosoauthserverbundle.

pierrre avatar pierrre commented on June 14, 2024

Actually, we should store the access token (doctrine document/entity) as an object in the oauth security token.
Currently, it's a string.

from fosoauthserverbundle.

AlmogBaku avatar AlmogBaku commented on June 14, 2024

I agree, storing this info on the token entity sounds more efficient.
cc: @willdurand what do you think?

I can work on PR if you think its relevant

from fosoauthserverbundle.

dkarlovi avatar dkarlovi commented on June 14, 2024

There's a branch in the bundle, there's #188, why hasn't this been merged yet? /cc @GuilhemN

from fosoauthserverbundle.

GuilhemN avatar GuilhemN commented on June 14, 2024

Sorry I don't have the time to review this bundle's PRs anymore... But I can add you as collaborator if you're willing to maintain this bundle.

from fosoauthserverbundle.

dkarlovi avatar dkarlovi commented on June 14, 2024

I'll do my best, let's do it. 👍

from fosoauthserverbundle.

dkarlovi avatar dkarlovi commented on June 14, 2024

Thinking about this, we shouldn't set the client, instead we should inject the whole token instead of only the string. Will work on this for 2.0.

from fosoauthserverbundle.

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.