Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit847058c

Browse files
authored
fix: set default values forRevokeURL property in external auth configs (#20270)
This PR adds logic that sets default values for `RevokeURL` in externalauth configs.
1 parent5ab72cc commit847058c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

‎coderd/externalauth/externalauth.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,9 @@ func copyDefaultSettings(config *codersdk.ExternalAuthConfig, defaults codersdk.
814814
ifconfig.ValidateURL=="" {
815815
config.ValidateURL=defaults.ValidateURL
816816
}
817+
ifconfig.RevokeURL=="" {
818+
config.RevokeURL=defaults.RevokeURL
819+
}
817820
ifconfig.AppInstallURL=="" {
818821
config.AppInstallURL=defaults.AppInstallURL
819822
}

‎coderd/externalauth/externalauth_internal_test.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ func TestGitlabDefaults(t *testing.T) {
1919
AuthURL:"https://gitlab.com/oauth/authorize",
2020
TokenURL:"https://gitlab.com/oauth/token",
2121
ValidateURL:"https://gitlab.com/oauth/token/info",
22+
RevokeURL:"https://gitlab.com/oauth/revoke",
2223
DisplayName:"GitLab",
2324
DisplayIcon:"/icon/gitlab.svg",
2425
Regex:`^(https?://)?gitlab\.com(/.*)?$`,
@@ -79,6 +80,7 @@ func TestGitlabDefaults(t *testing.T) {
7980
config.AuthURL="https://gitlab.company.org/oauth/authorize?foo=bar"
8081
config.ValidateURL="https://gitlab.company.org/oauth/token/info"
8182
config.TokenURL="https://gitlab.company.org/oauth/token"
83+
config.RevokeURL="https://gitlab.company.org/oauth/revoke"
8284
config.Regex=`^(https?://)?gitlab\.company\.org(/.*)?$`
8385
},
8486
},
@@ -90,13 +92,15 @@ func TestGitlabDefaults(t *testing.T) {
9092
AuthURL:"https://auth.com/auth",
9193
ValidateURL:"https://validate.com/validate",
9294
TokenURL:"https://token.com/token",
95+
RevokeURL:"https://token.com/revoke",
9396
Regex:"random",
9497
},
9598
expected:cloud,
9699
mutateExpected:func(config*codersdk.ExternalAuthConfig) {
97100
config.AuthURL="https://auth.com/auth"
98101
config.ValidateURL="https://validate.com/validate"
99102
config.TokenURL="https://token.com/token"
103+
config.RevokeURL="https://token.com/revoke"
100104
config.Regex=`random`
101105
},
102106
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp