mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-02 19:04:14 +02:00
multi-domain login redirects (#5564)
Add a new 'depends_on' route configuration option taking a list of additional hosts to redirect through on login. Update the authorize service and proxy service to support a chain of /.pomerium/callback redirects. Add an integration test for this feature.
This commit is contained in:
parent
c47055bece
commit
c848c225e8
12 changed files with 227 additions and 16 deletions
|
@ -235,8 +235,12 @@ func (a *Authorize) requireLoginResponse(
|
|||
signInURLQuery = url.Values{}
|
||||
signInURLQuery.Add("pomerium_traceparent", id)
|
||||
}
|
||||
var additionalHosts []string
|
||||
if request.Policy != nil {
|
||||
additionalHosts = request.Policy.DependsOn
|
||||
}
|
||||
redirectTo, err := state.authenticateFlow.AuthenticateSignInURL(
|
||||
ctx, signInURLQuery, &checkRequestURL, idp.GetId())
|
||||
ctx, signInURLQuery, &checkRequestURL, idp.GetId(), additionalHosts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue