Skip to content

Commit 012e51c

Browse files
authored
fix(cloudreve_v4): remove deprecated authn check for login (#767)
* fix(cloudreve_v4): disable authn check for login * chore(cloudreve_v4): update site login config fields
1 parent 59ec1db commit 012e51c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

drivers/cloudreve_v4/types.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@ type BasicConfigResp struct {
4747

4848
type SiteLoginConfigResp struct {
4949
LoginCaptcha bool `json:"login_captcha"`
50-
Authn bool `json:"authn"`
50+
// RegCaptcha bool `json:"reg_captcha"`
51+
// ForgetCaptcha bool `json:"forget_captcha"`
52+
// RegisterEnabled bool `json:"register_enabled"`
53+
// TosURL string `json:"tos_url"`
54+
// PrivacyPolicyURL string `json:"privacy_policy_url"`
55+
// SsoDisplayName string `json:"sso_display_name"`
56+
// OidcDisplayName string `json:"oidc_display_name"`
5157
}
5258

5359
type PrepareLoginResp struct {

drivers/cloudreve_v4/util.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ func (d *CloudreveV4) login() error {
9595
if err != nil {
9696
return err
9797
}
98-
if !siteConfig.Authn {
99-
return errors.New("authn not support")
100-
}
10198
var prepareLogin PrepareLoginResp
10299
err = d.request(http.MethodGet, "/session/prepare?email="+d.Addition.Username, nil, &prepareLogin)
103100
if err != nil {

0 commit comments

Comments
 (0)