mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: Allow multiple OIDC domains (#5210)
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
This commit is contained in:
@ -482,7 +482,7 @@ func TestUserOIDC(t *testing.T) {
|
||||
Name string
|
||||
Claims jwt.MapClaims
|
||||
AllowSignups bool
|
||||
EmailDomain string
|
||||
EmailDomain []string
|
||||
Username string
|
||||
AvatarURL string
|
||||
StatusCode int
|
||||
@ -528,8 +528,10 @@ func TestUserOIDC(t *testing.T) {
|
||||
"email_verified": true,
|
||||
},
|
||||
AllowSignups: true,
|
||||
EmailDomain: "coder.com",
|
||||
StatusCode: http.StatusForbidden,
|
||||
EmailDomain: []string{
|
||||
"coder.com",
|
||||
},
|
||||
StatusCode: http.StatusForbidden,
|
||||
}, {
|
||||
Name: "EmailDomainCaseInsensitive",
|
||||
Claims: jwt.MapClaims{
|
||||
@ -537,8 +539,10 @@ func TestUserOIDC(t *testing.T) {
|
||||
"email_verified": true,
|
||||
},
|
||||
AllowSignups: true,
|
||||
EmailDomain: "kwc.io",
|
||||
StatusCode: http.StatusTemporaryRedirect,
|
||||
EmailDomain: []string{
|
||||
"kwc.io",
|
||||
},
|
||||
StatusCode: http.StatusTemporaryRedirect,
|
||||
}, {
|
||||
Name: "EmptyClaims",
|
||||
Claims: jwt.MapClaims{},
|
||||
|
Reference in New Issue
Block a user