mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-23 09:30:50 +00:00
test: pkce only for OpenID Connect
This commit is contained in:
parent
d4af96647e
commit
985939c145
2 changed files with 65 additions and 14 deletions
|
@ -54,8 +54,8 @@ import (
|
|||
gouuid "github.com/google/uuid"
|
||||
"github.com/markbates/goth"
|
||||
"github.com/markbates/goth/gothic"
|
||||
goth_gitlab "github.com/markbates/goth/providers/github"
|
||||
goth_github "github.com/markbates/goth/providers/gitlab"
|
||||
goth_github "github.com/markbates/goth/providers/github"
|
||||
goth_gitlab "github.com/markbates/goth/providers/gitlab"
|
||||
"github.com/santhosh-tekuri/jsonschema/v5"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
@ -325,6 +325,13 @@ func authSourcePayloadOAuth2(name string) map[string]string {
|
|||
}
|
||||
}
|
||||
|
||||
func authSourcePayloadOpenIDConnect(name, appURL string) map[string]string {
|
||||
payload := authSourcePayloadOAuth2(name)
|
||||
payload["oauth2_provider"] = "openidConnect"
|
||||
payload["open_id_connect_auto_discovery_url"] = appURL + ".well-known/openid-configuration"
|
||||
return payload
|
||||
}
|
||||
|
||||
func authSourcePayloadGitLab(name string) map[string]string {
|
||||
payload := authSourcePayloadOAuth2(name)
|
||||
payload["oauth2_provider"] = "gitlab"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue