added onlyVerified field to the authMethods response
This commit is contained in:
parent
31317df21c
commit
64eefb44e8
|
@ -97,9 +97,11 @@ func (api *recordAuthApi) authMethods(c echo.Context) error {
|
||||||
AuthProviders []providerInfo `json:"authProviders"`
|
AuthProviders []providerInfo `json:"authProviders"`
|
||||||
UsernamePassword bool `json:"usernamePassword"`
|
UsernamePassword bool `json:"usernamePassword"`
|
||||||
EmailPassword bool `json:"emailPassword"`
|
EmailPassword bool `json:"emailPassword"`
|
||||||
|
OnlyVerified bool `json:"onlyVerified"`
|
||||||
}{
|
}{
|
||||||
UsernamePassword: authOptions.AllowUsernameAuth,
|
UsernamePassword: authOptions.AllowUsernameAuth,
|
||||||
EmailPassword: authOptions.AllowEmailAuth,
|
EmailPassword: authOptions.AllowEmailAuth,
|
||||||
|
OnlyVerified: authOptions.OnlyVerified,
|
||||||
AuthProviders: []providerInfo{},
|
AuthProviders: []providerInfo{},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ func TestRecordAuthMethodsList(t *testing.T) {
|
||||||
ExpectedContent: []string{
|
ExpectedContent: []string{
|
||||||
`"usernamePassword":true`,
|
`"usernamePassword":true`,
|
||||||
`"emailPassword":true`,
|
`"emailPassword":true`,
|
||||||
|
`"onlyVerified":false`,
|
||||||
`"authProviders":[{`,
|
`"authProviders":[{`,
|
||||||
`"name":"gitlab"`,
|
`"name":"gitlab"`,
|
||||||
`"state":`,
|
`"state":`,
|
||||||
|
@ -58,6 +59,7 @@ func TestRecordAuthMethodsList(t *testing.T) {
|
||||||
ExpectedContent: []string{
|
ExpectedContent: []string{
|
||||||
`"usernamePassword":false`,
|
`"usernamePassword":false`,
|
||||||
`"emailPassword":true`,
|
`"emailPassword":true`,
|
||||||
|
`"onlyVerified":true`,
|
||||||
`"authProviders":[]`,
|
`"authProviders":[]`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue