Open vanjabucic opened 7 years ago
That's a great idea! Do you have a timeframe that you're working on? I can get this in for a near release, but a bit busy in the next two weeks.
I was just thinking we could easily add it in:
getAccount(required)
...
ngx.req.set_header('x-stormpath-application-href', jwt.payload.iss)
ngx.req.set_header('x-stormpath-account-href', jwt.payload.sub)
if(jwt.payload.org) then
ngx.req.set_header('x-stormpath-org-href', jwt.payload.org)
end
end
I will just modify our working copy until you publish this, so no rush.
Thanks.
Cool. I think we'd want to use the full name x-stormpath-organization-href
so if you use that instead of org
would probably be best! Keep on the lookout for an update =]
When authenticating explicitly against an organization by supplying organizationNameKey=anOrganization parameter, the resulting JWT contains an 'org' element that points to that organization. We should inject that info into a header. ISS and SUB elements are already exposed: