summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorDenys Konovalov <privat@denyskon.de>2023-06-05 09:00:12 +0200
committerGitHub <noreply@github.com>2023-06-05 15:00:12 +0800
commitca35dec18b3d3d7dd5cde4c69a10ae830961faf7 (patch)
treee52b1b9c3032aadd8b5fae7dabec88b0de7ef4b4 /models
parent7d192cb674bc475b123c84b205aca821247c5dd1 (diff)
downloadgitea-ca35dec18b3d3d7dd5cde4c69a10ae830961faf7.tar.gz
gitea-ca35dec18b3d3d7dd5cde4c69a10ae830961faf7.zip
Add ability to set multiple redirect URIs in OAuth application UI (#25072)
OAuth applications can already have multiple redirect URIs if created/edited over API. This change allows for setting multiple redirect URIs through the UI as a comma-separated list (e. g. `https://example.org/redirect,https://redirect.example.org`) <details> <summary>Screenshots</summary> ![Bildschirmfoto vom 2023-06-04 17-14-40](https://github.com/go-gitea/gitea/assets/47871822/2206dc32-e7e4-4953-9ecb-e098890b3f54) ![Bildschirmfoto vom 2023-06-04 17-14-50](https://github.com/go-gitea/gitea/assets/47871822/cd97c73c-9310-44ee-a83a-b927a1ef94da) </details> Closes #25068
Diffstat (limited to 'models')
-rw-r--r--models/auth/oauth2.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/models/auth/oauth2.go b/models/auth/oauth2.go
index bda0668c45..53a5c28b4a 100644
--- a/models/auth/oauth2.go
+++ b/models/auth/oauth2.go
@@ -51,14 +51,6 @@ func (app *OAuth2Application) TableName() string {
return "oauth2_application"
}
-// PrimaryRedirectURI returns the first redirect uri or an empty string if empty
-func (app *OAuth2Application) PrimaryRedirectURI() string {
- if len(app.RedirectURIs) == 0 {
- return ""
- }
- return app.RedirectURIs[0]
-}
-
// ContainsRedirectURI checks if redirectURI is allowed for app
func (app *OAuth2Application) ContainsRedirectURI(redirectURI string) bool {
if !app.ConfidentialClient {