mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 23:28:39 +03:00
Fix issues found in PR #887
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -93,6 +93,11 @@ func TestOIDCInitialization(t *testing.T) {
|
||||
RoleField: "sftpgo_role",
|
||||
}
|
||||
err = config.initialize()
|
||||
if assert.Error(t, err) {
|
||||
assert.Contains(t, err.Error(), "oidc: required scope \"openid\" is not set")
|
||||
}
|
||||
config.Scopes = []string{oidc.ScopeOpenID}
|
||||
err = config.initialize()
|
||||
if assert.Error(t, err) {
|
||||
assert.Contains(t, err.Error(), "oidc: unable to initialize provider")
|
||||
}
|
||||
@@ -1263,6 +1268,7 @@ func getTestOIDCServer() *httpdServer {
|
||||
UsernameField: "preferred_username",
|
||||
RoleField: "sftpgo_role",
|
||||
ImplicitRoles: false,
|
||||
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
|
||||
CustomFields: nil,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user