parent
815ced424c
commit
7e5798569b
4 changed files with 64 additions and 14 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
|
||||
httphelper "github.com/zitadel/oidc/pkg/http"
|
||||
"github.com/zitadel/oidc/pkg/oidc"
|
||||
|
@ -98,5 +99,16 @@ func ValidateEndSessionPostLogoutRedirectURI(postLogoutRedirectURI string, clien
|
|||
return nil
|
||||
}
|
||||
}
|
||||
if globClient, ok := client.(HasRedirectGlobs); ok {
|
||||
for _, uriGlob := range globClient.PostLogoutRedirectURIGlobs() {
|
||||
isMatch, err := path.Match(uriGlob, postLogoutRedirectURI)
|
||||
if err != nil {
|
||||
return oidc.ErrServerError().WithParent(err)
|
||||
}
|
||||
if isMatch {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return oidc.ErrInvalidRequest().WithDescription("post_logout_redirect_uri invalid")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue