Closed springuper closed 7 years ago
Thanks for creating an issue.
But we also need API to let other internal systems to get user information, redirect unauthenticated users to internal user system and redirect back when they have login.
Can you give an example use case?
use case:
aqua
as 'http://user.company.com', root manager can manage accounts/admins in front-end guiframe
as 'http://api.user.company.com', so 'http://cms.company.com' and other internal systems can use jwt
or ba
authentication to login/logout and get user informationaqua
will post the login info to the caller system after user login. In this case, we want aqua
to be a SSO servicewe can deploy both aqua
and frame
for current usage, but as they two share a lot of backend code, there may be some upgrade inconsistent issues.
Aqua took Frame and added to it. Consider it a fork of Frame. I don't see a benefit of running both boilerplates and connecting them to the same same database. That sounds like a maintenance nightmare.
Side note: One cool thing about hapi is that you can create multiple connections in the same app bound to different ports. See: http://hapijs.com/api#serverconnections
The scenerio you describe is advanced so there will be more complexity getting an ideal setup. Here's what I'm thinking:
api.example.com
and change the basic authentication to use JWT./server/api/*
, ./server/models/*
and ./server/mailer.js
code since api.example.com
is going to handle that stuff. You'll still need ./server/web/*
to serve www.example.com
.api.example.com
./client/helpers/json-fetch.js
function to support JWT (by default, it's relying on the browser passing cookies automatically).crumb
config and/or remove that feature: https://github.com/jedireza/aqua/blob/ffec3a220ee36e7f7c8ec1dc105d06ee4823a1f8/client/helpers/json-fetch.js#L21-L23 I'm sure I'm missing a lot of steps you'll need to take, but those are my fist thoughts. I hope that helps.
@jedireza thanks a lot. I'm trying to modify aqua
to use multi auth strategies for a route, so both front-end and other system can access it.
I'll update the results here.
We want to use Aqua as an internal user system. Front end is useful for admins to manage users/groups/permissions in a straightforward UI. But we also need API to let other internal systems to get user information, redirect unauthenticated users to internal user system and redirect back when they have login.
Is there any way to reach our requirements?