Git Product home page Git Product logo

nette-oauth2-server's Introduction

nette-oauth2-server's People

Contributors

lookyman avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

nette-oauth2-server's Issues

[feature request] Convert OAuth2Presenter to a trait

Hi.

In our application all presenters inherit from a base class to enable passing of some @persistent attributes. Unfortunately, as I understand it, nette does not allow passing them between classes without common parent.

This means we get into a kind of impossible situation because:

  • while we can extend the OAuth2Presenter from this package it doesn't help because it does not inherit from our base presenter and therefore it will not get the persistent attribute
  • we can not make it extend from our base presenter because, well, we don't control the code
  • we can copy-paste all your code into our own class and make it inherit from the base presenter, but I think we will all agree that is incredibly stupid.

The change here would involve pulling all the code from the presenter to a trait. By default the presenter provided by this package would just use the trait and everything will stay exactly the same for the outside users.

But in addition it would enable us to make our own class, inherit our own base presenter but use the shared code from this package as an implementation.

We should probably extract an interface from the OAuth2Presenter just to be sure it preserves the contract.

What do you think? I can make a pull request if this seems like a not-completely-terrible idea.

(NB. Please also understand the application I work on is several years old and the architecture is not the best possible. We know that. It is also impossible to change. Please don't tell us we are doing it wrong :D)

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.