Giter Club home page Giter Club logo

Comments (4)

rdegges avatar rdegges commented on July 24, 2024

Heyo -- this is actually supported already -- but the way it works is a bit 'different'.

When you have a Stormpath Application, you can map as many Directories to it as you want. By default, Express-Stormpath will lookup / retrieve your Application, because things like API authentication / etc are all based off the Application object, not a directory object.

Let's say you have 5 Directories mapped to an Application (in order):

  • Directory 1
  • Directory 2
  • Directory 3
  • Directory 4
  • Directory 5

If you have created an IDENTICAL user account in each Application, then when we generate an API key / etc. we'll use the account from the first linked Directory (Directory 1, in this case).

If you have different user accounts in each Application, then we'll find and use the right one automatically.

So -- this should already be working for you. What I'd do is create one Directory for each microservice, and however many unique accounts in that Directory for your consumers.

from express-stormpath.

ksmithut avatar ksmithut commented on July 24, 2024

That's awesome, thanks :) I'll come back if it doesn't work, but you explained it well and it makes sense that it would work.

from express-stormpath.

ksmithut avatar ksmithut commented on July 24, 2024

@rdegges so if you find and use the right one automatically, is there no way to restrict a user from Directory 1 from a microservice that is meant to be using Directory 2?

from express-stormpath.

rdegges avatar rdegges commented on July 24, 2024

That's correct -- there's no way to restrict it. This was done on purpose though -- as a central design decision.

EG: If you want to have truly separate 'applications', then you should simply create multiple Applications and map as many directories to those as you'd like.

The idea of an Application is to be the central access point for one codebase / app / whatever.

When I build SOA stuff myself, I typically create one Application/Directory for each service.

For instance:

  • 1 App / Directory called 'logs' for my logging service.
  • 1 App / Directory called 'billing' for my billing service.
  • 1 App / Directory called 'storage' for my storage service.
  • etc.

-Randall

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.