Giter Club home page Giter Club logo

Comments (5)

rdegges avatar rdegges commented on July 24, 2024

Awesome! Glad you like it :)

I haven't really thought about this -- but it should be possible without too much tweaking. This would probably be something we could include in the future.

-Randall

from express-stormpath.

wrenoud avatar wrenoud commented on July 24, 2024

Above commit (wrenoud/stormpath-express@b8bd59d) is just a thought. And I realize you may have additional concerns to think about.

from express-stormpath.

rdegges avatar rdegges commented on July 24, 2024

Hmmmm. Thanks for the commit, but after thinking about this a bit, I don't think it's a common enough use case to warrant modifying the middleware with optional params.

I think that what I'll probably add in the near future is a more flexible authorization check, such that you can include variables / combinations of AND / OR groupings. This would allow you to assert a lot more complex stuff with a single API.

In the meantime, you could most likely handle this in a special case by doing something like:

app.get('/blah', stormpath.loginRequired, function(req, res) {
  req.locals.user.getGroups(function(group) {
   if (group is valid) {
     ...;
    }
  }
});

It's not perfect of course, but would be a suitable interim until I can think of a really clean way of handling a better authorization system :(

Sorry about that ><

This library is still pretty new, so I'm trying to think of the absolute drop-dead simplest way to handle all forms of authorization ^^

Also: you have a SICK beard. Love that shit. +100000 <33333

from express-stormpath.

wrenoud avatar wrenoud commented on July 24, 2024

Completely understand. I'll workaround until you have a slick implementation.

Thanks!

from express-stormpath.

rdegges avatar rdegges commented on July 24, 2024

Closing this issue for now (still have an awesome beard tho)!

from express-stormpath.

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.