Git Product home page Git Product logo

Comments (7)

kusmierz avatar kusmierz commented on July 28, 2024

@bshaffer is there any example/cookbook/tips to integrate oauth2-server and doctrine2?

from oauth2-server-php-docs.

bshaffer avatar bshaffer commented on July 28, 2024

Yes! See the following:

config files: https://github.com/bshaffer/oauth2-server-bundle/tree/develop/Resources/config/doctrine
entity files: https://github.com/bshaffer/oauth2-server-bundle/tree/develop/Entity

It's part of the symfony2 bundle, so it's not as agnostic as I would like it, but if you're familiar with Doctrine2 it's a good place to start

from oauth2-server-php-docs.

kusmierz avatar kusmierz commented on July 28, 2024

Thanks @bshaffer indeed, I've written Doctrine Adapter and it wasn't too hard :)

Anyway - is there any actual db struct? I've found at least 3, all different between each other.

from oauth2-server-php-docs.

bshaffer avatar bshaffer commented on July 28, 2024

see "Define your Schema" on the Step-by-Step Walkthrough. Is this what you're looking for?

from oauth2-server-php-docs.

kusmierz avatar kusmierz commented on July 28, 2024

part of...

See ie.: https://github.com/bshaffer/oauth2-server-php/blob/develop/src/OAuth2/Storage/Pdo.php#L518-524 there is jti table, what is for?

In schema above, user has only username, password, first and lastname, but here: https://github.com/bshaffer/oauth2-server-php/blob/develop/src/OAuth2/Storage/Pdo.php#L501-503 email address and scope also.

Which is correct?

from oauth2-server-php-docs.

bshaffer avatar bshaffer commented on July 28, 2024

The differences depend on what grant types you implement, and whether you use OpenID Connect. If you're using the JWTBearer grant type, and you are supporting jti (which is optional), you'll want the JTI table. If you're using OpenIDConnect AND you want to support the email_address claim, you'll want to have those fields as part of your user storage.

I wouldn't worry about it... most of those fields/tables are optional, and it doesn't sound like your implementation will need them.

from oauth2-server-php-docs.

kusmierz avatar kusmierz commented on July 28, 2024

Now I understand, thanks. Is there anywhere described all of those "optional" fields?

from oauth2-server-php-docs.

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.