Giter VIP home page Giter VIP logo

Comments (2)

aacotroneo avatar aacotroneo commented on September 25, 2024

Single responsibility is a long thread... a good principle to follow, but it also depends on the level of abstraction... ie. I could make a single class called 'laravel-saml2' which has a single responsibility at that level.
For our case, maintainability is not an issue. We can always refactor later when we know what to extend... and API is 'simple' now. Now the user is like our most important 'api'. It's not a 'user', but it's a thing which gives you a very simple interface to saml with 4 methods. If we move that logic into the controller it will be harder to share with our users, and/or we need to introduce new entities (which add complexity).

from laravel-saml2.

beeglebug avatar beeglebug commented on September 25, 2024

I agree completely with not adding extra complexity, which is why I thought we could just move the two functions which are concerned with the request input onto the Saml2LoginEvent (and inject the request into it alongside the user object). That way the code consuming the event still gets access to the same functions, just a couple of them move to the other object.

I might make the change and send the pull request just so you can see what I mean, but feel free to ignore it, it's your library after all (and it is quite a fussy change tbh).

from laravel-saml2.

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.