summaryrefslogtreecommitdiff
path: root/vendor/codeberg.org/superseriousbusiness/oauth2/v4/manage/util.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-04-25 15:15:36 +0200
committerLibravatar GitHub <noreply@github.com>2025-04-25 15:15:36 +0200
commitffde1b150faca940bc6c172068aa068cf468aa39 (patch)
tree2b325bf50946b95502d948d5700c148d667346d8 /vendor/codeberg.org/superseriousbusiness/oauth2/v4/manage/util.go
parent[chore] Update `activity` to v1.14.0 (#4038) (diff)
downloadgotosocial-ffde1b150faca940bc6c172068aa068cf468aa39.tar.xz
[chore] Move deps to code.superseriousbusiness.org (#4054)
Diffstat (limited to 'vendor/codeberg.org/superseriousbusiness/oauth2/v4/manage/util.go')
-rw-r--r--vendor/codeberg.org/superseriousbusiness/oauth2/v4/manage/util.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/vendor/codeberg.org/superseriousbusiness/oauth2/v4/manage/util.go b/vendor/codeberg.org/superseriousbusiness/oauth2/v4/manage/util.go
deleted file mode 100644
index fd1146231..000000000
--- a/vendor/codeberg.org/superseriousbusiness/oauth2/v4/manage/util.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package manage
-
-import (
- "net/url"
- "strings"
-
- "codeberg.org/superseriousbusiness/oauth2/v4/errors"
-)
-
-type (
- // ValidateURIHandler validates that redirectURI is contained in baseURI
- ValidateURIHandler func(baseURI, redirectURI string) error
-)
-
-// DefaultValidateURI validates that redirectURI is contained in baseURI
-func DefaultValidateURI(baseURI string, redirectURI string) error {
- base, err := url.Parse(baseURI)
- if err != nil {
- return err
- }
-
- redirect, err := url.Parse(redirectURI)
- if err != nil {
- return err
- }
- if !strings.HasSuffix(redirect.Host, base.Host) {
- return errors.ErrInvalidRedirectURI
- }
- return nil
-}