Giter Club home page Giter Club logo

nette-oauth2-server-doctrine's People

Contributors

jigsik avatar lookyman avatar mirdic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nette-oauth2-server-doctrine's Issues

Support for Nette 3.0

Hello,

Nette 3.0 is out for a while, is there any chance you will support it? Thanks!

Support for multiple client redirect URIs

Hi there!

league/oauth2-server supports multiple redirect uris for each client -> https://github.com/thephpleague/oauth2-server/blob/master/src/Grant/AuthCodeGrant.php#L246

Any idea how to implement it easily? What came in my mind was changing doctrine type of $redirectUri property to simple_array, which would not cause a BC break but potentially if anyone used it with commas in url (who does that? ๐Ÿ˜„) it would stop work for him.

Another idea was to use json_array, but that would be a BC break as it would require change of data structure in db.

Maybe creating next property and pick the one which is not null?

How to store information if user has approved authorization?

There is no callback in handleApprove or handleDeny in ApproveControl.

Currently the user has to approve authorization on every login. Is it possible to approve authorization only once?

I only thought about adding callbacks onApprove and onDeny in ApproveControl.

Thanks in advance.

Using own entities (extending)

Hi, i am thinking about extending ClientEntity and i would like to know what would be the best way to do it (and basically to any other oauth related entity).

Creating own entity would not be enough, i need to wire it into repository and query service.

Is there any suggestions how to do it? I can imagine there could be config option to pass entity class name.

Setup breaks with server version 5.1.4+

In versions 5.1.4+ and 6.0+ there were some changes to the setup: https://oauth2.thephpleague.com/v5-security-improvements/

specifically one has now to call

$server->setEncryptionKey('lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen');

(where the string is some random data)

before adding grants or doing anything with the server.

On the 5 series this generates a deprecation warning only (which we treat as errors in our codebase). I can pin for the lower version for now but it would be nice to have this fixed :)

MySQL tables are never up to date!

Hi, i have weird problem with doctrine entities and the database diff. It always says database is not up to date.

Running bin/console orm:schema-tool:update --dump-sql results in:

 The following SQL statements will be executed:

     ALTER TABLE oauth2_auth_code CHANGE expiry_date_time expiry_date_time DATETIME NOT NULL;
     ALTER TABLE oauth2_refresh_token CHANGE expiry_date_time expiry_date_time DATETIME NOT NULL;
     ALTER TABLE oauth2_access_token CHANGE expiry_date_time expiry_date_time DATETIME NOT NULL;

I checked database and the columns are exactly like this.

It would not be such a big problem, but we use a CI check if migrations are up to date.

What is weird as well is that generated migration has exactly same SQL query for up() and down() versioning (which confirms that the columns in database are exactly same as they should be according to doctrine mapping):

public function up(Schema $schema) : void
    {
        $this->addSql('ALTER TABLE oauth2_auth_code CHANGE expiry_date_time expiry_date_time DATETIME NOT NULL');
        $this->addSql('ALTER TABLE oauth2_refresh_token CHANGE expiry_date_time expiry_date_time DATETIME NOT NULL');
        $this->addSql('ALTER TABLE oauth2_access_token CHANGE expiry_date_time expiry_date_time DATETIME NOT NULL');
    }

    public function down(Schema $schema) : void
    {
        $this->addSql('ALTER TABLE oauth2_access_token CHANGE expiry_date_time expiry_date_time DATETIME NOT NULL');
        $this->addSql('ALTER TABLE oauth2_auth_code CHANGE expiry_date_time expiry_date_time DATETIME NOT NULL');
        $this->addSql('ALTER TABLE oauth2_refresh_token CHANGE expiry_date_time expiry_date_time DATETIME NOT NULL');
    }

Do you please have any tips where to start my findings? I can ofc send a PR, but any tip will fasten up my research drastically.

Thank you!

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.