diff options
| author | 2025-03-09 17:47:56 +0100 | |
|---|---|---|
| committer | 2025-12-01 22:08:04 +0100 | |
| commit | b1af8fd87760b34e3ff2fd3bda38f211815a0473 (patch) | |
| tree | 9317fad1a7ec298d7a8d2678e4e422953bbc6f33 /vendor/code.superseriousbusiness.org/oauth2/v4/manage/util.go | |
| parent | [chore] update URLs to forked source (diff) | |
| download | gotosocial-b1af8fd87760b34e3ff2fd3bda38f211815a0473.tar.xz | |
[chore] remove vendor
Diffstat (limited to 'vendor/code.superseriousbusiness.org/oauth2/v4/manage/util.go')
| -rw-r--r-- | vendor/code.superseriousbusiness.org/oauth2/v4/manage/util.go | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/vendor/code.superseriousbusiness.org/oauth2/v4/manage/util.go b/vendor/code.superseriousbusiness.org/oauth2/v4/manage/util.go deleted file mode 100644 index 733f880f5..000000000 --- a/vendor/code.superseriousbusiness.org/oauth2/v4/manage/util.go +++ /dev/null @@ -1,32 +0,0 @@ -package manage - -import ( - "code.superseriousbusiness.org/oauth2/v4" - "net/url" - "strings" - - "code.superseriousbusiness.org/oauth2/v4/errors" -) - -type ( - // ValidateURIHandler validates that redirectURI is contained in baseURI - ValidateURIHandler func(baseURI, redirectURI string) error - ExtractExtensionHandler func(*oauth2.TokenGenerateRequest, oauth2.ExtendableTokenInfo) -) - -// 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 -} |
