diff --git a/api/v1/config.pb.go b/api/v1/config.pb.go index 63ed855..2a14940 100644 --- a/api/v1/config.pb.go +++ b/api/v1/config.pb.go @@ -649,6 +649,7 @@ type ConfigSecurity struct { MaxDocumentSize int32 `protobuf:"varint,9,opt,name=max_document_size,json=maxDocumentSize,proto3" json:"max_document_size,omitempty"` DocumentAllowedExt []string `protobuf:"bytes,10,rep,name=document_allowed_ext,json=documentAllowedExt,proto3" json:"document_allowed_ext,omitempty"` LoginRequired bool `protobuf:"varint,11,opt,name=login_required,json=loginRequired,proto3" json:"login_required,omitempty"` + EnableVerifyRegisterEmail bool `protobuf:"varint,12,opt,name=enable_verify_register_email,json=enableVerifyRegisterEmail,proto3" json:"enable_verify_register_email,omitempty"` } func (m *ConfigSecurity) Reset() { *m = ConfigSecurity{} } @@ -761,6 +762,13 @@ func (m *ConfigSecurity) GetLoginRequired() bool { return false } +func (m *ConfigSecurity) GetEnableVerifyRegisterEmail() bool { + if m != nil { + return m.EnableVerifyRegisterEmail + } + return false +} + // 系统配置 type Settings struct { System *ConfigSystem `protobuf:"bytes,1,opt,name=system,proto3" json:"system,omitempty"` @@ -1411,125 +1419,126 @@ func init() { func init() { proto.RegisterFile("api/v1/config.proto", fileDescriptor_321614cd6c9c1b8a) } var fileDescriptor_321614cd6c9c1b8a = []byte{ - // 1876 bytes of a gzipped FileDescriptorProto + // 1901 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0xdd, 0x6f, 0x1b, 0xb9, - 0x11, 0x8f, 0xbe, 0x2c, 0x69, 0x24, 0x4b, 0x0e, 0xfd, 0x11, 0x45, 0x49, 0x1d, 0x67, 0x7b, 0xd7, + 0x11, 0x8f, 0xbe, 0x2c, 0x89, 0x92, 0x25, 0x87, 0x76, 0x12, 0x45, 0x49, 0x1d, 0x67, 0x7b, 0xd7, 0xf3, 0x05, 0x85, 0x75, 0x71, 0xbf, 0x80,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 0x21, 0xcb, 0x4c, 0x34, 0x62, 0x64, 0x0b, 0x56, 0x12, 0x9e, 0x0e, 0xcd, - 0x08, 0xab, 0x5a, 0xa3, 0x5e, 0xb2, 0xf5, 0x7a, 0x25, 0x62, 0x33, 0xc2, 0xca, 0xd6, 0xa8, 0x13, - 0x2c, 0x7a, 0xc4, 0xc5, 0x70, 0x64, 0xb0, 0xb6, 0x35, 0xea, 0x25, 0x9b, 0x6a, 0xac, 0x8f, 0x2b, - 0x2e, 0x8e, 0x83, 0xff, 0x56, 0xa0, 0xed, 0xd6, 0x3a, 0x9b, 0x69, 0xc3, 0xc7, 0x76, 0x72, 0x2c, - 0xc7, 0x4c, 0xa4, 0xb8, 0x54, 0x93, 0x7a, 0xc9, 0x2e, 0x65, 0x84, 0x49, 0x78, 0x4e, 0x22, 0x14, - 0xec, 0xc6, 0xaf, 0xf8, 0xec, 0x95, 0x54, 0xb1, 0xf6, 0x44, 0x2a, 0x64, 0x4b, 0x9b, 0x98, 0xeb, - 0x48, 0x09, 0xac, 0x9d, 0x5f, 0x75, 0x51, 0x65, 0x03, 0x4a, 0xe4, 0x50, 0x7a, 0x46, 0xe1, 0xd8, - 0xd6, 0xfe, 0x92, 0x4d, 0x45, 0x24, 0x53, 0xcf, 0xa3, 0x5c, 0x24, 0x6b, 0x50, 0x11, 0x51, 0xe6, - 0x09, 0x64, 0x87, 0xe4, 0x31, 0x34, 0x59, 0xca, 0x92, 0x99, 0x11, 0x91, 0x46, 0x02, 0x35, 0xe9, - 0x5c, 0x61, 0x63, 0xd3, 0xc2, 0x70, 0x24, 0xb9, 0xa3, 0x51, 0x21, 0x93, 0x8f, 0x60, 0x23, 0x92, - 0xd9, 0x4c, 0xd9, 0xbc, 0x84, 0xda, 0x30, 0x65, 0xc2, 0x19, 0x67, 0x0a, 0x19, 0xd5, 0xa4, 0xa4, - 0xb0, 0x9d, 0x59, 0xd3, 0x2f, 0x39, 0x53, 0x64, 0x00, 0xeb, 0x8a, 0x0f, 0x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bb, 0x7d, 0xe7, 0xcb, + 0xb7, 0xdb, 0x77, 0xbe, 0x7a, 0xbb, 0x7d, 0x87, 0xf8, 0xff, 0x15, 0xa7, 0xa5, 0xdf, 0xde, 0x9d, + 0x48, 0x05, 0xb1, 0x8c, 0xfc, 0xd4, 0x9f, 0xcc, 0x9e, 0x5f, 0xac, 0xe1, 0x92, 0xdf, 0xfb, 0x7f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x24, 0x4d, 0x78, 0x92, 0xea, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2340,6 +2349,16 @@ func (m *ConfigSecurity) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.EnableVerifyRegisterEmail { + i-- + if m.EnableVerifyRegisterEmail { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } if m.LoginRequired { i-- if m.LoginRequired { @@ -3225,6 +3244,9 @@ func (m *ConfigSecurity) Size() (n int) { if m.LoginRequired { n += 2 } + if m.EnableVerifyRegisterEmail { + n += 2 + } return n } @@ -5350,6 +5372,26 @@ func (m *ConfigSecurity) Unmarshal(dAtA []byte) error { } } m.LoginRequired = bool(v != 0) + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnableVerifyRegisterEmail", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowConfig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EnableVerifyRegisterEmail = bool(v != 0) default: iNdEx = preIndex skippy, err := skipConfig(dAtA[iNdEx:]) diff --git a/api/v1/config.proto b/api/v1/config.proto index 0ced2d8..2279b41 100644 --- a/api/v1/config.proto +++ b/api/v1/config.proto @@ -96,6 +96,7 @@ message ConfigSecurity { int32 max_document_size = 9; // 文档最大大小 repeated string document_allowed_ext = 10; // 文档允许的扩展名 bool login_required = 11; // 是否登录才能访问 + bool enable_verify_register_email = 12; // 是否开启注册邮箱验证 } // 系统配置 diff --git a/api/v1/user.pb.go b/api/v1/user.pb.go index 6d02114..b1d071d 100644 --- a/api/v1/user.pb.go +++ b/api/v1/user.pb.go @@ -33,6 +33,31 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type EmailCodeType int32 + +const ( + EmailCodeType_EmailCodeTypeRegister EmailCodeType = 0 + EmailCodeType_EmailCodeTypeLogin EmailCodeType = 1 +) + +var EmailCodeType_name = map[int32]string{ + 0: "EmailCodeTypeRegister", + 1: "EmailCodeTypeLogin", +} + +var EmailCodeType_value = map[string]int32{ + "EmailCodeTypeRegister": 0, + "EmailCodeTypeLogin": 1, +} + +func (x EmailCodeType) String() string { + return proto.EnumName(EmailCodeType_name, int32(x)) +} + +func (EmailCodeType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_b74e2e33d57193df, []int{0} +} + // 用户信息 type User struct { LoginAt *time.Time `protobuf:"bytes,19,opt,name=login_at,json=loginAt,proto3,stdtime" json:"login_at,omitempty"` @@ -253,6 +278,7 @@ type RegisterAndLoginRequest struct { Captcha string `protobuf:"bytes,3,opt,name=captcha,proto3" json:"captcha,omitempty"` CaptchaId string `protobuf:"bytes,4,opt,name=captcha_id,json=captchaId,proto3" json:"captcha_id,omitempty"` Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` + Code string `protobuf:"bytes,6,opt,name=code,proto3" json:"code,omitempty"` } func (m *RegisterAndLoginRequest) Reset() { *m = RegisterAndLoginRequest{} } @@ -323,6 +349,81 @@ func (m *RegisterAndLoginRequest) GetEmail() string { return "" } +func (m *RegisterAndLoginRequest) GetCode() string { + if m != nil { + return m.Code + } + return "" +} + +type SendEmailCodeRequest struct { + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + Captcha string `protobuf:"bytes,2,opt,name=captcha,proto3" json:"captcha,omitempty"` + CaptchaId string `protobuf:"bytes,3,opt,name=captcha_id,json=captchaId,proto3" json:"captcha_id,omitempty"` + Type EmailCodeType `protobuf:"varint,4,opt,name=type,proto3,enum=api.v1.EmailCodeType" json:"type,omitempty"` +} + +func (m *SendEmailCodeRequest) Reset() { *m = SendEmailCodeRequest{} } +func (m *SendEmailCodeRequest) String() string { return proto.CompactTextString(m) } +func (*SendEmailCodeRequest) ProtoMessage() {} +func (*SendEmailCodeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b74e2e33d57193df, []int{2} +} +func (m *SendEmailCodeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SendEmailCodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SendEmailCodeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SendEmailCodeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SendEmailCodeRequest.Merge(m, src) +} +func (m *SendEmailCodeRequest) XXX_Size() int { + return m.Size() +} +func (m *SendEmailCodeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SendEmailCodeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SendEmailCodeRequest proto.InternalMessageInfo + +func (m *SendEmailCodeRequest) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +func (m *SendEmailCodeRequest) GetCaptcha() string { + if m != nil { + return m.Captcha + } + return "" +} + +func (m *SendEmailCodeRequest) GetCaptchaId() string { + if m != nil { + return m.CaptchaId + } + return "" +} + +func (m *SendEmailCodeRequest) GetType() EmailCodeType { + if m != nil { + return m.Type + } + return EmailCodeType_EmailCodeTypeRegister +} + // 查询验证码请求 type GetUserCaptchaRequest struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` @@ -332,7 +433,7 @@ func (m *GetUserCaptchaRequest) Reset() { *m = GetUserCaptchaRequest{} } func (m *GetUserCaptchaRequest) String() string { return proto.CompactTextString(m) } func (*GetUserCaptchaRequest) ProtoMessage() {} func (*GetUserCaptchaRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{2} + return fileDescriptor_b74e2e33d57193df, []int{3} } func (m *GetUserCaptchaRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -378,7 +479,7 @@ func (m *LoginReply) Reset() { *m = LoginReply{} } func (m *LoginReply) String() string { return proto.CompactTextString(m) } func (*LoginReply) ProtoMessage() {} func (*LoginReply) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{3} + return fileDescriptor_b74e2e33d57193df, []int{4} } func (m *LoginReply) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -430,7 +531,7 @@ func (m *DeleteUserRequest) Reset() { *m = DeleteUserRequest{} } func (m *DeleteUserRequest) String() string { return proto.CompactTextString(m) } func (*DeleteUserRequest) ProtoMessage() {} func (*DeleteUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{4} + return fileDescriptor_b74e2e33d57193df, []int{5} } func (m *DeleteUserRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -475,7 +576,7 @@ func (m *GetUserRequest) Reset() { *m = GetUserRequest{} } func (m *GetUserRequest) String() string { return proto.CompactTextString(m) } func (*GetUserRequest) ProtoMessage() {} func (*GetUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{5} + return fileDescriptor_b74e2e33d57193df, []int{6} } func (m *GetUserRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -524,7 +625,7 @@ func (m *FindPasswordRequest) Reset() { *m = FindPasswordRequest{} } func (m *FindPasswordRequest) String() string { return proto.CompactTextString(m) } func (*FindPasswordRequest) ProtoMessage() {} func (*FindPasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{6} + return fileDescriptor_b74e2e33d57193df, []int{7} } func (m *FindPasswordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -605,7 +706,7 @@ func (m *ListUserRequest) Reset() { *m = ListUserRequest{} } func (m *ListUserRequest) String() string { return proto.CompactTextString(m) } func (*ListUserRequest) ProtoMessage() {} func (*ListUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{7} + return fileDescriptor_b74e2e33d57193df, []int{8} } func (m *ListUserRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -707,7 +808,7 @@ func (m *ListUserReply) Reset() { *m = ListUserReply{} } func (m *ListUserReply) String() string { return proto.CompactTextString(m) } func (*ListUserReply) ProtoMessage() {} func (*ListUserReply) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{8} + return fileDescriptor_b74e2e33d57193df, []int{9} } func (m *ListUserReply) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -762,7 +863,7 @@ func (m *GetUserCaptchaReply) Reset() { *m = GetUserCaptchaReply{} } func (m *GetUserCaptchaReply) String() string { return proto.CompactTextString(m) } func (*GetUserCaptchaReply) ProtoMessage() {} func (*GetUserCaptchaReply) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{9} + return fileDescriptor_b74e2e33d57193df, []int{10} } func (m *GetUserCaptchaReply) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -830,7 +931,7 @@ func (m *UpdateUserPasswordRequest) Reset() { *m = UpdateUserPasswordReq func (m *UpdateUserPasswordRequest) String() string { return proto.CompactTextString(m) } func (*UpdateUserPasswordRequest) ProtoMessage() {} func (*UpdateUserPasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{10} + return fileDescriptor_b74e2e33d57193df, []int{11} } func (m *UpdateUserPasswordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -889,7 +990,7 @@ func (m *GetUserPermissionsReply) Reset() { *m = GetUserPermissionsReply func (m *GetUserPermissionsReply) String() string { return proto.CompactTextString(m) } func (*GetUserPermissionsReply) ProtoMessage() {} func (*GetUserPermissionsReply) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{11} + return fileDescriptor_b74e2e33d57193df, []int{12} } func (m *GetUserPermissionsReply) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -938,7 +1039,7 @@ func (m *SetUserRequest) Reset() { *m = SetUserRequest{} } func (m *SetUserRequest) String() string { return proto.CompactTextString(m) } func (*SetUserRequest) ProtoMessage() {} func (*SetUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{12} + return fileDescriptor_b74e2e33d57193df, []int{13} } func (m *SetUserRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1017,7 +1118,7 @@ func (m *Dynamic) Reset() { *m = Dynamic{} } func (m *Dynamic) String() string { return proto.CompactTextString(m) } func (*Dynamic) ProtoMessage() {} func (*Dynamic) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{13} + return fileDescriptor_b74e2e33d57193df, []int{14} } func (m *Dynamic) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1105,7 +1206,7 @@ func (m *ListUserDynamicRequest) Reset() { *m = ListUserDynamicRequest{} func (m *ListUserDynamicRequest) String() string { return proto.CompactTextString(m) } func (*ListUserDynamicRequest) ProtoMessage() {} func (*ListUserDynamicRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{14} + return fileDescriptor_b74e2e33d57193df, []int{15} } func (m *ListUserDynamicRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1158,7 +1259,7 @@ func (m *ListUserDynamicReply) Reset() { *m = ListUserDynamicReply{} } func (m *ListUserDynamicReply) String() string { return proto.CompactTextString(m) } func (*ListUserDynamicReply) ProtoMessage() {} func (*ListUserDynamicReply) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{15} + return fileDescriptor_b74e2e33d57193df, []int{16} } func (m *ListUserDynamicReply) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1215,7 +1316,7 @@ func (m *Sign) Reset() { *m = Sign{} } func (m *Sign) String() string { return proto.CompactTextString(m) } func (*Sign) ProtoMessage() {} func (*Sign) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{16} + return fileDescriptor_b74e2e33d57193df, []int{17} } func (m *Sign) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1295,7 +1396,7 @@ func (m *ListUserDownloadRequest) Reset() { *m = ListUserDownloadRequest func (m *ListUserDownloadRequest) String() string { return proto.CompactTextString(m) } func (*ListUserDownloadRequest) ProtoMessage() {} func (*ListUserDownloadRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{17} + return fileDescriptor_b74e2e33d57193df, []int{18} } func (m *ListUserDownloadRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1347,7 +1448,7 @@ func (m *ListUserDownloadReply) Reset() { *m = ListUserDownloadReply{} } func (m *ListUserDownloadReply) String() string { return proto.CompactTextString(m) } func (*ListUserDownloadReply) ProtoMessage() {} func (*ListUserDownloadReply) Descriptor() ([]byte, []int) { - return fileDescriptor_b74e2e33d57193df, []int{18} + return fileDescriptor_b74e2e33d57193df, []int{19} } func (m *ListUserDownloadReply) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1391,8 +1492,10 @@ func (m *ListUserDownloadReply) GetDownload() []*Download { } func init() { + proto.RegisterEnum("api.v1.EmailCodeType", EmailCodeType_name, EmailCodeType_value) proto.RegisterType((*User)(nil), "api.v1.User") proto.RegisterType((*RegisterAndLoginRequest)(nil), "api.v1.RegisterAndLoginRequest") + proto.RegisterType((*SendEmailCodeRequest)(nil), "api.v1.SendEmailCodeRequest") proto.RegisterType((*GetUserCaptchaRequest)(nil), "api.v1.GetUserCaptchaRequest") proto.RegisterType((*LoginReply)(nil), "api.v1.LoginReply") proto.RegisterType((*DeleteUserRequest)(nil), "api.v1.DeleteUserRequest") @@ -1415,113 +1518,119 @@ func init() { func init() { proto.RegisterFile("api/v1/user.proto", fileDescriptor_b74e2e33d57193df) } var fileDescriptor_b74e2e33d57193df = []byte{ - // 1687 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0x4f, 0x6f, 0x23, 0x49, - 0x15, 0x9f, 0xf6, 0x7f, 0x3f, 0x27, 0x99, 0xa4, 0xe2, 0xd8, 0x4e, 0x67, 0x26, 0x76, 0x7a, 0x05, - 0x84, 0x61, 0x14, 0x33, 0x19, 0xc1, 0x4a, 0xb3, 0x5a, 0xa1, 0xcc, 0x64, 0x77, 0x15, 0x14, 0x44, - 0xe8, 0x4c, 0x84, 0xb4, 0x7b, 0x88, 0x2a, 0xee, 0x8a, 0x29, 0xb6, 0xbb, 0xab, 0xa7, 0xbb, 0x1c, - 0x6f, 0x38, 0x72, 0xe1, 0xba, 0x12, 0x5f, 0x03, 0x89, 0x2f, 0xc0, 0x07, 0xe0, 0x80, 0xd0, 0x4a, - 0x7b, 0xe1, 0xb4, 0xa0, 0x19, 0xae, 0x5c, 0xf6, 0x03, 0x20, 0x54, 0xff, 0xda, 0xee, 0x76, 0x7a, - 0x49, 0x66, 0x6e, 0xfd, 0x5e, 0xbd, 0xfa, 0x55, 0xd5, 0x7b, 0xbf, 0xf7, 0xc7, 0x86, 0x35, 0x1c, - 0xd1, 0xe1, 0xd5, 0x93, 0xe1, 0x24, 0x21, 0xf1, 0x5e, 0x14, 0x33, 0xce, 0x50, 0x0d, 0x47, 0x74, - 0xef, 0xea, 0x89, 0xdd, 0x1f, 0x33, 0x36, 0xf6, 0xc9, 0x50, 0x6a, 0x2f, 0x26, 0x97, 0x43, 0x4e, - 0x03, 0x92, 0x70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, - 0x89, 0x58, 0x28, 0xab, 0xd3, 0x0d, 0x27, 0xbf, 0x9c, 0xb2, 0x77, 0x3a, 0xd9, 0xfe, 0x3f, 0x27, - 0xf3, 0x29, 0x7b, 0x66, 0x3d, 0x7a, 0xfe, 0x93, 0xbf, 0xbe, 0xde, 0xb6, 0xbe, 0x7a, 0xbd, 0x6d, - 0xfd, 0xeb, 0xf5, 0xb6, 0xf5, 0xe5, 0x9b, 0xed, 0x7b, 0x5f, 0xbd, 0xd9, 0xbe, 0xf7, 0x8f, 0x37, - 0xdb, 0xf7, 0x40, 0xff, 0xa9, 0x76, 0x62, 0x7d, 0xba, 0x16, 0xb0, 0x98, 0x78, 0x6c, 0xa4, 0x01, - 0x3f, 0xb8, 0x7a, 0x72, 0x51, 0x93, 0x87, 0x3e, 0xfd, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, - 0xbb, 0x15, 0x8a, 0x8d, 0x13, 0x00, 0x00, + // 1790 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0xcd, 0x6e, 0x1b, 0xc9, + 0x11, 0xf6, 0x88, 0xff, 0x45, 0x49, 0x96, 0x5a, 0xfc, 0x13, 0x25, 0x8b, 0xd4, 0x2c, 0x92, 0x68, + 0x1d, 0x43, 0x8c, 0x65, 0x24, 0x0b, 0xec, 0x62, 0x11, 0x48, 0xb2, 0x77, 0xa1, 0xc0, 0x41, 0x9c, + 0x91, 0x85, 0x00, 0xbb, 0x07, 0x61, 0xcc, 0x6e, 0x31, 0x9d, 0x1d, 0x4e, 0x8f, 0x67, 0x9a, 0xe2, + 0x2a, 0xc7, 0x5c, 0x72, 0x35, 0x90, 0xd7, 0x08, 0x90, 0x73, 0x80, 0x3c, 0x40, 0x0e, 0x39, 0x2c, + 0x90, 0x4b, 0x4e, 0x9b, 0xc0, 0x0e, 0x90, 0x53, 0x2e, 0x7e, 0x80, 0x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a, 0x72, 0xc7, 0xf9, 0xe6, 0xe5, 0x8e, 0xf3, 0xaf, 0x97, 0x3b, 0xce, 0x8b, 0x57, 0x3b, 0xb7, + 0xbe, 0x79, 0xb5, 0x73, 0xeb, 0x1f, 0xaf, 0x76, 0x6e, 0x81, 0xfe, 0xab, 0xf2, 0x89, 0xf3, 0xc5, + 0xfa, 0x98, 0xc5, 0x04, 0xb3, 0xa1, 0x86, 0xf9, 0xe4, 0xf2, 0xfe, 0xb3, 0xb2, 0x74, 0xf5, 0xe0, + 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x85, 0xf6, 0xe0, 0xad, 0xe3, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1577,6 +1686,8 @@ type UserAPIClient interface { FindPasswordStepOne(ctx context.Context, in *FindPasswordRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // 找回密码:第二步,修改密码 FindPasswordStepTwo(ctx context.Context, in *FindPasswordRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // 发送邮箱验证码。 + SendEmailCode(ctx context.Context, in *SendEmailCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) } type userAPIClient struct { @@ -1758,6 +1869,15 @@ func (c *userAPIClient) FindPasswordStepTwo(ctx context.Context, in *FindPasswor return out, nil } +func (c *userAPIClient) SendEmailCode(ctx context.Context, in *SendEmailCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.v1.UserAPI/SendEmailCode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // UserAPIServer is the server API for UserAPI service. type UserAPIServer interface { // 用户注册 @@ -1801,6 +1921,8 @@ type UserAPIServer interface { FindPasswordStepOne(context.Context, *FindPasswordRequest) (*emptypb.Empty, error) // 找回密码:第二步,修改密码 FindPasswordStepTwo(context.Context, *FindPasswordRequest) (*emptypb.Empty, error) + // 发送邮箱验证码。 + SendEmailCode(context.Context, *SendEmailCodeRequest) (*emptypb.Empty, error) } // UnimplementedUserAPIServer can be embedded to have forward compatible implementations. @@ -1864,6 +1986,9 @@ func (*UnimplementedUserAPIServer) FindPasswordStepOne(ctx context.Context, req func (*UnimplementedUserAPIServer) FindPasswordStepTwo(ctx context.Context, req *FindPasswordRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method FindPasswordStepTwo not implemented") } +func (*UnimplementedUserAPIServer) SendEmailCode(ctx context.Context, req *SendEmailCodeRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendEmailCode not implemented") +} func RegisterUserAPIServer(s *grpc.Server, srv UserAPIServer) { s.RegisterService(&_UserAPI_serviceDesc, srv) @@ -2211,6 +2336,24 @@ func _UserAPI_FindPasswordStepTwo_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _UserAPI_SendEmailCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendEmailCodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserAPIServer).SendEmailCode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.UserAPI/SendEmailCode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserAPIServer).SendEmailCode(ctx, req.(*SendEmailCodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _UserAPI_serviceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.UserAPI", HandlerType: (*UserAPIServer)(nil), @@ -2291,6 +2434,10 @@ var _UserAPI_serviceDesc = grpc.ServiceDesc{ MethodName: "FindPasswordStepTwo", Handler: _UserAPI_FindPasswordStepTwo_Handler, }, + { + MethodName: "SendEmailCode", + Handler: _UserAPI_SendEmailCode_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/user.proto", @@ -2512,6 +2659,13 @@ func (m *RegisterAndLoginRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.Code) > 0 { + i -= len(m.Code) + copy(dAtA[i:], m.Code) + i = encodeVarintUser(dAtA, i, uint64(len(m.Code))) + i-- + dAtA[i] = 0x32 + } if len(m.Email) > 0 { i -= len(m.Email) copy(dAtA[i:], m.Email) @@ -2550,6 +2704,55 @@ func (m *RegisterAndLoginRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *SendEmailCodeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SendEmailCodeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SendEmailCodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Type != 0 { + i = encodeVarintUser(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x20 + } + if len(m.CaptchaId) > 0 { + i -= len(m.CaptchaId) + copy(dAtA[i:], m.CaptchaId) + i = encodeVarintUser(dAtA, i, uint64(len(m.CaptchaId))) + i-- + dAtA[i] = 0x1a + } + if len(m.Captcha) > 0 { + i -= len(m.Captcha) + copy(dAtA[i:], m.Captcha) + i = encodeVarintUser(dAtA, i, uint64(len(m.Captcha))) + i-- + dAtA[i] = 0x12 + } + if len(m.Email) > 0 { + i -= len(m.Email) + copy(dAtA[i:], m.Email) + i = encodeVarintUser(dAtA, i, uint64(len(m.Email))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *GetUserCaptchaRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3522,6 +3725,34 @@ func (m *RegisterAndLoginRequest) Size() (n int) { if l > 0 { n += 1 + l + sovUser(uint64(l)) } + l = len(m.Code) + if l > 0 { + n += 1 + l + sovUser(uint64(l)) + } + return n +} + +func (m *SendEmailCodeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Email) + if l > 0 { + n += 1 + l + sovUser(uint64(l)) + } + l = len(m.Captcha) + if l > 0 { + n += 1 + l + sovUser(uint64(l)) + } + l = len(m.CaptchaId) + if l > 0 { + n += 1 + l + sovUser(uint64(l)) + } + if m.Type != 0 { + n += 1 + sovUser(uint64(m.Type)) + } return n } @@ -4803,6 +5034,203 @@ func (m *RegisterAndLoginRequest) Unmarshal(dAtA []byte) error { } m.Email = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUser + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthUser + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthUser + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipUser(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthUser + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SendEmailCodeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUser + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SendEmailCodeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SendEmailCodeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Email", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUser + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthUser + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthUser + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Email = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Captcha", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUser + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthUser + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthUser + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Captcha = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CaptchaId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUser + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthUser + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthUser + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CaptchaId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUser + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= EmailCodeType(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipUser(dAtA[iNdEx:]) diff --git a/api/v1/user.pb.gw.go b/api/v1/user.pb.gw.go index 9cb420c..ac0b5ec 100644 --- a/api/v1/user.pb.gw.go +++ b/api/v1/user.pb.gw.go @@ -612,6 +612,40 @@ func local_request_UserAPI_FindPasswordStepTwo_0(ctx context.Context, marshaler } +func request_UserAPI_SendEmailCode_0(ctx context.Context, marshaler runtime.Marshaler, client UserAPIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SendEmailCodeRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SendEmailCode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_UserAPI_SendEmailCode_0(ctx context.Context, marshaler runtime.Marshaler, server UserAPIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SendEmailCodeRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SendEmailCode(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterUserAPIHandlerServer registers the http handlers for service UserAPI to "mux". // UnaryRPC :call UserAPIServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -1055,6 +1089,29 @@ func RegisterUserAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, se }) + mux.Handle("POST", pattern_UserAPI_SendEmailCode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_UserAPI_SendEmailCode_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_UserAPI_SendEmailCode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1476,6 +1533,26 @@ func RegisterUserAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl }) + mux.Handle("POST", pattern_UserAPI_SendEmailCode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_UserAPI_SendEmailCode_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_UserAPI_SendEmailCode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1517,6 +1594,8 @@ var ( pattern_UserAPI_FindPasswordStepOne_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "user", "findpassword", "stepone"}, "", runtime.AssumeColonVerbOpt(true))) pattern_UserAPI_FindPasswordStepTwo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "user", "findpassword", "steptwo"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_UserAPI_SendEmailCode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "user", "email", "code"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -1557,4 +1636,6 @@ var ( forward_UserAPI_FindPasswordStepOne_0 = runtime.ForwardResponseMessage forward_UserAPI_FindPasswordStepTwo_0 = runtime.ForwardResponseMessage + + forward_UserAPI_SendEmailCode_0 = runtime.ForwardResponseMessage ) diff --git a/api/v1/user.proto b/api/v1/user.proto index 144ab25..839beb3 100644 --- a/api/v1/user.proto +++ b/api/v1/user.proto @@ -51,6 +51,20 @@ message RegisterAndLoginRequest { string captcha = 3; // 验证码 string captcha_id = 4; // 验证码ID string email = 5; // 邮箱 + string code = 6; // 邮箱验证码(如果用户注册需要验证邮箱,则必须传递该参数) +} + +enum EmailCodeType { + EmailCodeTypeRegister = 0; // 注册 + EmailCodeTypeLogin = 1; // 登录 + // EmailCodeTypeFindPassword = 2; // 找回密码 +} + +message SendEmailCodeRequest { + string email = 1; // 邮箱 + string captcha = 2; + string captcha_id = 3; + EmailCodeType type = 4; } // 查询验证码请求 @@ -324,4 +338,12 @@ service UserAPI { body : '*', }; } + + // 发送邮箱验证码。 + rpc SendEmailCode(SendEmailCodeRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post : '/api/v1/user/email/code', + body : '*', + }; + } } \ No newline at end of file diff --git a/biz/comment.go b/biz/comment.go index bc0bb63..89c3e95 100644 --- a/biz/comment.go +++ b/biz/comment.go @@ -43,7 +43,7 @@ func (s *CommentAPIService) CreateComment(ctx context.Context, req *pb.CreateCom // 评论验证码错误 cfg := s.dbModel.GetConfigOfSecurity(model.ConfigSecurityEnableCaptchaComment) - if cfg.EnableCaptchaComment && !captcha.VerifyCaptcha(req.CaptchaId, req.Captcha) { + if cfg.EnableCaptchaComment && !captcha.VerifyCaptcha(req.CaptchaId, req.Captcha, true) { return nil, status.Errorf(codes.InvalidArgument, "验证码错误") } diff --git a/biz/user.go b/biz/user.go index a7940cc..4eea1b1 100644 --- a/biz/user.go +++ b/biz/user.go @@ -72,6 +72,7 @@ func (s *UserAPIService) Register(ctx context.Context, req *pb.RegisterAndLoginR model.ConfigSecurityEnableCaptchaRegister, model.ConfigSecurityEnableRegister, model.ConfigSecurityIsClose, + model.ConfigSecurityEnableVerifyRegisterEmail, ) if !cfg.EnableRegister { @@ -82,10 +83,23 @@ func (s *UserAPIService) Register(ctx context.Context, req *pb.RegisterAndLoginR return nil, status.Errorf(codes.InvalidArgument, "网站已关闭,暂时不允许注册") } - if cfg.EnableCaptchaRegister && !captcha.VerifyCaptcha(req.CaptchaId, req.Captcha) { + if cfg.EnableCaptchaRegister && !captcha.VerifyCaptcha(req.CaptchaId, req.Captcha, true) { return nil, status.Errorf(codes.InvalidArgument, "验证码错误") } + var latestEmailCode model.EmailCode + if cfg.EnableVerifyRegisterEmail { // 启用了邮箱验证 + latestEmailCode = s.dbModel.GetLatestEmailCode(req.Email, int32(pb.EmailCodeType_EmailCodeTypeRegister)) + if latestEmailCode.Id == 0 || latestEmailCode.Code != req.Code || latestEmailCode.IsUsed { + return nil, status.Errorf(codes.InvalidArgument, "邮箱验证码错误") + } + + // 邮箱验证码是否已过期 + if latestEmailCode.CreatedAt.Add(time.Minute * 30).Before(time.Now()) { + return nil, status.Errorf(codes.InvalidArgument, "邮箱验证码已过期") + } + } + exist, _ := s.dbModel.GetUserByUsername(req.Username, "id") if exist.Id > 0 { return nil, status.Errorf(codes.AlreadyExists, "用户名已存在") @@ -133,6 +147,11 @@ func (s *UserAPIService) Register(ctx context.Context, req *pb.RegisterAndLoginR pbUser := &pb.User{} util.CopyStruct(&user, pbUser) + if latestEmailCode.Id > 0 { + // 标记邮箱验证码已使用 + s.dbModel.UpdateEmailCode(&model.EmailCode{Id: latestEmailCode.Id, IsUsed: true}, "is_used") + } + return &pb.LoginReply{Token: token, User: pbUser}, nil } @@ -146,7 +165,7 @@ func (s *UserAPIService) Login(ctx context.Context, req *pb.RegisterAndLoginRequ // 如果启用了验证码,则需要进行验证码验证 cfg := s.dbModel.GetConfigOfSecurity(model.ConfigSecurityEnableCaptchaLogin) - if cfg.EnableCaptchaLogin && !captcha.VerifyCaptcha(req.CaptchaId, req.Captcha) { + if cfg.EnableCaptchaLogin && !captcha.VerifyCaptcha(req.CaptchaId, req.Captcha, true) { return nil, status.Errorf(codes.InvalidArgument, "验证码错误") } @@ -633,7 +652,7 @@ func (s *UserAPIService) FindPasswordStepOne(ctx context.Context, req *v1.FindPa } cfgSec := s.dbModel.GetConfigOfSecurity(model.ConfigSecurityEnableCaptchaFindPassword) - if cfgSec.EnableCaptchaFindPassword && !captcha.VerifyCaptcha(req.CaptchaId, req.Captcha) { + if cfgSec.EnableCaptchaFindPassword && !captcha.VerifyCaptcha(req.CaptchaId, req.Captcha, true) { return nil, status.Errorf(codes.InvalidArgument, "验证码错误") } @@ -709,7 +728,7 @@ func (s *UserAPIService) FindPasswordStepTwo(ctx context.Context, req *v1.FindPa } cfgSec := s.dbModel.GetConfigOfSecurity(model.ConfigSecurityEnableCaptchaFindPassword) - if cfgSec.EnableCaptchaFindPassword && !captcha.VerifyCaptcha(req.CaptchaId, req.Captcha) { + if cfgSec.EnableCaptchaFindPassword && !captcha.VerifyCaptcha(req.CaptchaId, req.Captcha, true) { return nil, status.Errorf(codes.InvalidArgument, "验证码错误") } @@ -762,3 +781,83 @@ func (s *UserAPIService) ListUserDownload(ctx context.Context, req *v1.ListUserD } return &v1.ListUserDownloadReply{Download: downloads, Total: total}, nil } + +// 发送邮箱验证码 +// TODO: 当前只对注册功能生效。后续可以考虑对其他功能 +func (s *UserAPIService) SendEmailCode(ctx context.Context, req *v1.SendEmailCodeRequest) (res *emptypb.Empty, err error) { + if !util.IsValidEmail(req.Email) { + return nil, status.Errorf(codes.InvalidArgument, "邮箱格式不正确") + } + + existUser, _ := s.dbModel.GetUserByEmail(req.Email, "id") + if existUser.Id > 0 { + return nil, status.Errorf(codes.AlreadyExists, "邮箱已存在") + } + + cfgSec := s.dbModel.GetConfigOfSecurity(model.ConfigSecurityEnableCaptchaRegister, model.ConfigSecurityEnableRegister, model.ConfigSecurityEnableVerifyRegisterEmail) + if !cfgSec.EnableRegister { + return nil, status.Errorf(codes.InvalidArgument, "系统未开放注册") + } + + if !cfgSec.EnableVerifyRegisterEmail { + return nil, status.Errorf(codes.InvalidArgument, "系统未开启注册邮箱验证功能") + } + + if cfgSec.EnableCaptchaRegister && !captcha.VerifyCaptcha(req.CaptchaId, req.Captcha, false) { + return nil, status.Errorf(codes.InvalidArgument, "验证码错误") + } + + code := s.dbModel.GetLatestEmailCode(req.Email, int32(req.Type)) + // 如果邮件发送早于1分钟,则不再发送 + if code.Id > 0 && time.Now().Sub(*code.CreatedAt).Seconds() < 60 { + return nil, status.Errorf(codes.InvalidArgument, "发送太频繁,请稍后再试") + } + + ip := "" + if ips, _ := util.GetGRPCRemoteIP(ctx); len(ips) > 0 { + ip = ips[0] + } + + cfgSystem := s.dbModel.GetConfigOfSystem(model.ConfigSystemSitename, model.ConfigSystemDomain) + + codeStr := unchained.GetRandomString(4) + body := fmt.Sprintf(` +
+
+

您好:

+

欢迎注册成为 %s 用户。您本次注册验证码为:%s,30分钟内有效。

+
+
+ `, + cfgSystem.Domain, + cfgSystem.Sitename, + codeStr, + ) + + // 发送邮件 + err = s.dbModel.SendMail( + "邮箱验证码", + req.Email, + body, + ) + + // 生成验证码 + code = model.EmailCode{ + Email: req.Email, + Code: codeStr, + Ip: ip, + Success: true, + } + + if err != nil { + code.Error = err.Error() + code.Success = false + } + + err = s.dbModel.CreateEmailCode(&code) + if err != nil { + s.logger.Error("创建验证码失败", zap.Error(err)) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return &emptypb.Empty{}, nil +} diff --git a/model/config.go b/model/config.go index 1b0fb05..3704063 100644 --- a/model/config.go +++ b/model/config.go @@ -243,6 +243,7 @@ const ( ConfigSecurityDocumentAllowedExt = "document_allowed_ext" // 允许上传的文档类型 ConfigSecurityLoginRequired = "login_required" // 是否需要登录才能查看文档 ConfigSecurityAttachmentRetentionMinute = "attachment_retention_minute" // 被删除的附件,保留时长,单位分钟 + ConfigSecurityEnableVerifyRegisterEmail = "enable_verify_register_email" // 是否开启注册邮箱验证 ) type ConfigSecurity struct { @@ -257,6 +258,7 @@ type ConfigSecurity struct { EnableCaptchaRegister bool `json:"enable_captcha_register"` // 是否启用注册验证码 EnableCaptchaComment bool `json:"enable_captcha_comment"` // 是否启用评论验证码 EnableCaptchaFindPassword bool `json:"enable_captcha_find_password"` // 找回密码是否需要验证码 + EnableVerifyRegisterEmail bool `json:"enable_verify_register_email"` // 是否开启注册邮箱验证 DocumentAllowedExt []string `json:"document_allowed_ext"` // 允许上传的文档类型 LoginRequired bool `json:"login_required"` // 是否需要登录才能查看文档 } @@ -655,6 +657,7 @@ func (m *DBModel) initConfig() (err error) { cfgs := []Config{ // 系统配置项 {Category: ConfigCategorySystem, Name: ConfigSystemSitename, Label: "网站名称", Value: "魔豆文库", Placeholder: "请输入您网站的名称,如:魔豆文库", InputType: InputTypeText, Sort: 10, Options: ""}, + {Category: ConfigCategorySystem, Name: ConfigSystemDomain, Label: "【重要】网站域名", Value: "https://moredoc.mnt.ltd", Placeholder: "请输入您网站的域名访问地址,带 https:// 或 http:// 如 https://moredoc.mnt.ltd,用以生成网站地图sitemap", InputType: InputTypeText, Sort: 11, Options: ""}, {Category: ConfigCategorySystem, Name: ConfigSystemTitle, Label: "首页标题", Value: "MOREDOC · 魔豆文库", Placeholder: "请输入您网站的首页标题,如:魔豆文库,强大、专业的文库系统", InputType: InputTypeText, Sort: 20, Options: ""}, {Category: ConfigCategorySystem, Name: ConfigSystemKeywords, Label: "网站关键字", Value: "MOREDOC · 魔豆文库", Placeholder: "请输入您网站的关键字", InputType: InputTypeText, Sort: 30, Options: ""}, {Category: ConfigCategorySystem, Name: ConfigSystemDescription, Label: "网站描述", Value: "MOREDOC · 魔豆文库", Placeholder: "请输入您网站的描述", InputType: InputTypeTextarea, Sort: 40, Options: ""}, @@ -665,7 +668,6 @@ func (m *DBModel) initConfig() (err error) { {Category: ConfigCategorySystem, Name: ConfigSystemLoginBackground, Label: "登录页背景图", Value: "", Placeholder: "请上传一张图片作为登录页背景图", InputType: InputTypeImage, Sort: 63, Options: ""}, {Category: ConfigCategorySystem, Name: ConfigSystemSecIcp, Label: "京公网安备", Value: "", Placeholder: "请输入您网站的京公网安备备案号", InputType: InputTypeText, Sort: 68, Options: ""}, {Category: ConfigCategorySystem, Name: ConfigSystemIcp, Label: "网站备案号", Value: "", Placeholder: "请输入您网站的备案号", InputType: InputTypeText, Sort: 69, Options: ""}, - {Category: ConfigCategorySystem, Name: ConfigSystemDomain, Label: "网站域名", Value: "https://moredoc.mnt.ltd", Placeholder: "请输入您网站的域名访问地址,带 https:// 或 http:// 如 https://moredoc.mnt.ltd,用以生成网站地图sitemap", InputType: InputTypeText, Sort: 70, Options: ""}, {Category: ConfigCategorySystem, Name: ConfigSystemCopyrightStartYear, Label: "版权起始年", Value: "2019", Placeholder: "请输入您网站版权起始年,如:2019,则前台会显示如 ©2019 - 20xx 的字样", InputType: InputTypeText, Sort: 80, Options: ""}, {Category: ConfigCategorySystem, Name: ConfigSystemAnalytics, Label: "网站统计代码", Value: "", Placeholder: "请输入您网站的统计代码,当前只支持百度统计", InputType: InputTypeTextarea, Sort: 90, Options: ""}, @@ -689,6 +691,7 @@ func (m *DBModel) initConfig() (err error) { {Category: ConfigCategorySecurity, Name: ConfigSecurityEnableCaptchaRegister, Label: "是否开启注册验证码", Value: "true", Placeholder: "请选择是否开启注册验证码", InputType: InputTypeSwitch, Sort: 20, Options: ""}, {Category: ConfigCategorySecurity, Name: ConfigSecurityEnableCaptchaComment, Label: "是否开启评论验证码", Value: "true", Placeholder: "请选择是否开启评论验证码", InputType: InputTypeSwitch, Sort: 21, Options: ""}, {Category: ConfigCategorySecurity, Name: ConfigSecurityEnableCaptchaFindPassword, Label: "是否开启找回密码验证码", Value: "true", Placeholder: "请选择是否开启找回密码验证码", InputType: InputTypeSwitch, Sort: 22, Options: ""}, + {Category: ConfigCategorySecurity, Name: ConfigSecurityEnableVerifyRegisterEmail, Label: "是否开启注册邮箱验证", Value: "false", Placeholder: "用户注册时是否需要验证邮箱", InputType: InputTypeSwitch, Sort: 50, Options: ""}, // 底部链接 {Category: ConfigCategoryFooter, Name: ConfigFooterAbout, Label: "关于我们", Value: "/article/about", Placeholder: "请输入关于我们的链接地址,留空表示不显示", InputType: InputTypeText, Sort: 24, Options: ""}, diff --git a/model/emailCode.go b/model/emailCode.go new file mode 100644 index 0000000..07392f4 --- /dev/null +++ b/model/emailCode.go @@ -0,0 +1,133 @@ +package model + +import ( + "time" + + "go.uber.org/zap" + "gorm.io/gorm" +) + +type EmailCode struct { + Id int64 `form:"id" json:"id,omitempty" gorm:"primaryKey;autoIncrement;column:id;comment:;"` + Email string `form:"email" json:"email,omitempty" gorm:"column:email;type:varchar(64);size:64;index:idx_email;comment:邮箱;"` + Ip string `form:"ip" json:"ip,omitempty" gorm:"column:ip;type:varchar(64);size:64;comment:IP地址;"` + Code string `form:"code" json:"code,omitempty" gorm:"column:code;type:varchar(16);size:16;comment:邮箱验证码;"` + CodeType int `form:"code_type" json:"code_type,omitempty" gorm:"column:code_type;type:smallint(6);size:6;default:0;comment:验证码类型,0注册,1登录;"` + Success bool `form:"success" json:"success,omitempty" gorm:"column:success;type:tinyint(1);size:1;default:0;comment:是否发送成功;"` + Error string `form:"error" json:"error,omitempty" gorm:"column:error;type:text;comment:错误信息;"` + CreatedAt *time.Time `form:"created_at" json:"created_at,omitempty" gorm:"column:created_at;type:datetime;comment:;"` + UpdatedAt *time.Time `form:"updated_at" json:"updated_at,omitempty" gorm:"column:updated_at;type:datetime;comment:;"` + IsUsed bool `form:"is_used" json:"is_used,omitempty" gorm:"column:is_used;type:tinyint(1);size:1;default:0;comment:是否已使用;"` +} + +func (EmailCode) TableName() string { + return tablePrefix + "email_code" +} + +// CreateEmailCode 创建EmailCode +func (m *DBModel) CreateEmailCode(emailCode *EmailCode) (err error) { + err = m.db.Create(emailCode).Error + if err != nil { + m.logger.Error("CreateEmailCode", zap.Error(err)) + return + } + return +} + +// UpdateEmailCode 更新EmailCode,如果需要更新指定字段,则请指定updateFields参数 +func (m *DBModel) UpdateEmailCode(emailCode *EmailCode, updateFields ...string) (err error) { + db := m.db.Model(emailCode) + tableName := EmailCode{}.TableName() + + updateFields = m.FilterValidFields(tableName, updateFields...) + if len(updateFields) > 0 { // 更新指定字段 + db = db.Select(updateFields) + } else { // 更新全部字段,包括零值字段 + db = db.Select(m.GetTableFields(tableName)) + } + + err = db.Where("id = ?", emailCode.Id).Updates(emailCode).Error + if err != nil { + m.logger.Error("UpdateEmailCode", zap.Error(err)) + } + return +} + +// GetEmailCode 根据id获取EmailCode +func (m *DBModel) GetEmailCode(id int64, fields ...string) (emailCode EmailCode, err error) { + db := m.db + + fields = m.FilterValidFields(EmailCode{}.TableName(), fields...) + if len(fields) > 0 { + db = db.Select(fields) + } + + err = db.Where("id = ?", id).First(&emailCode).Error + return +} + +type OptionGetEmailCodeList struct { + Page int + Size int + WithCount bool // 是否返回总数 + Ids []int64 // id列表 + SelectFields []string // 查询字段 + QueryRange map[string][2]interface{} // map[field][]{min,max} + QueryIn map[string][]interface{} // map[field][]{value1,value2,...} + QueryLike map[string][]interface{} // map[field][]{value1,value2,...} + Sort []string +} + +// GetEmailCodeList 获取EmailCode列表 +func (m *DBModel) GetEmailCodeList(opt *OptionGetEmailCodeList) (emailCodeList []EmailCode, total int64, err error) { + tableName := EmailCode{}.TableName() + db := m.db.Model(&EmailCode{}) + db = m.generateQueryRange(db, tableName, opt.QueryRange) + db = m.generateQueryIn(db, tableName, opt.QueryIn) + db = m.generateQueryLike(db, tableName, opt.QueryLike) + + if len(opt.Ids) > 0 { + db = db.Where("id in (?)", opt.Ids) + } + + if opt.WithCount { + err = db.Count(&total).Error + if err != nil { + m.logger.Error("GetEmailCodeList", zap.Error(err)) + return + } + } + + opt.SelectFields = m.FilterValidFields(tableName, opt.SelectFields...) + if len(opt.SelectFields) > 0 { + db = db.Select(opt.SelectFields) + } + + db = m.generateQuerySort(db, tableName, opt.Sort) + + db = db.Offset((opt.Page - 1) * opt.Size).Limit(opt.Size) + + err = db.Find(&emailCodeList).Error + if err != nil && err != gorm.ErrRecordNotFound { + m.logger.Error("GetEmailCodeList", zap.Error(err)) + } + return +} + +// DeleteEmailCode 删除数据 +func (m *DBModel) DeleteEmailCode(ids []int64) (err error) { + err = m.db.Where("id in (?)", ids).Delete(&EmailCode{}).Error + if err != nil { + m.logger.Error("DeleteEmailCode", zap.Error(err)) + } + return +} + +// 获取最新一条邮箱验证码 +func (m *DBModel) GetLatestEmailCode(email string, codeType int32) (code EmailCode) { + err := m.db.Where("email = ? and code_type = ?", email, codeType).Order("id desc").Find(&code).Error + if err != nil { + m.logger.Error("GetLatestEmailCode", zap.Error(err)) + } + return +} diff --git a/model/init.go b/model/init.go index 552a8cf..cb1a4ab 100644 --- a/model/init.go +++ b/model/init.go @@ -175,6 +175,7 @@ func (m *DBModel) SyncDB() (err error) { &Report{}, &Navigation{}, &Punishment{}, + &EmailCode{}, } m.alterTableBeforeSyncDB() diff --git a/util/captcha/captcha.go b/util/captcha/captcha.go index f766547..0d809c9 100644 --- a/util/captcha/captcha.go +++ b/util/captcha/captcha.go @@ -73,6 +73,6 @@ func GenerateCaptcha(captchaType string, length, width, height int) (id, b64s st } // VerifyCaptcha 验证验证码 -func VerifyCaptcha(id string, captchaValue string) (ok bool) { - return store.Verify(id, captchaValue, true) +func VerifyCaptcha(id string, captchaValue string, clear bool) (ok bool) { + return store.Verify(id, captchaValue, clear) }