diff options
author | 2022-04-26 20:30:25 -0700 | |
---|---|---|
committer | 2023-01-31 15:16:42 +0100 | |
commit | 83b4c9ebc87d0fddf4e638f13e3af1483912e3a5 (patch) | |
tree | 47840b84c0fd3cb226eab2ecb3dbce0617163406 /vendor/github.com/superseriousbusiness/oauth2/v4/manage/util.go | |
parent | [chore] update URLs to forked source (diff) | |
download | gotosocial-83b4c9ebc87d0fddf4e638f13e3af1483912e3a5.tar.xz |
[chore] remove vendor
Diffstat (limited to 'vendor/github.com/superseriousbusiness/oauth2/v4/manage/util.go')
-rw-r--r-- | vendor/github.com/superseriousbusiness/oauth2/v4/manage/util.go | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/vendor/github.com/superseriousbusiness/oauth2/v4/manage/util.go b/vendor/github.com/superseriousbusiness/oauth2/v4/manage/util.go deleted file mode 100644 index 4ffce70bb..000000000 --- a/vendor/github.com/superseriousbusiness/oauth2/v4/manage/util.go +++ /dev/null @@ -1,30 +0,0 @@ -package manage - -import ( - "net/url" - "strings" - - "github.com/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 -} |