feat(auth): 用户账户 - 完善个人资料与登录日志 (#752)
Co-authored-by: wuligao <1247662379@qq.com>
This commit is contained in:
1 parent
e70fe1b9c9
commit
4c1d2b4012
83 files changed
+5836
-328
No files matched your search
@@ -0,0 +1,33 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
"yingce/backend/internal/auth"
|
||||
"yingce/backend/internal/model"
|
||||
)
|
||||
|
||||
type UserProfile = auth.UserProfile
|
||||
type ProfilePasswordRequest = auth.ProfilePasswordRequest
|
||||
type ProfileEmailCodeRequest = auth.ProfileEmailCodeRequest
|
||||
type ProfileEmailChangeRequest = auth.ProfileEmailChangeRequest
|
||||
type ProfileEmailChangeResult = auth.ProfileEmailChangeResult
|
||||
type VerificationTicket = auth.VerificationTicket
|
||||
|
||||
func (s *Service) UserProfile(actor *model.User, cookie string) (*UserProfile, error) {
|
||||
return s.authDomain().UserProfile(actor, cookie)
|
||||
}
|
||||
func (s *Service) ChangeProfilePassword(actor *model.User, cookie string, req ProfilePasswordRequest) error {
|
||||
return s.authDomain().ChangeProfilePassword(actor, cookie, req)
|
||||
}
|
||||
func (s *Service) SendProfileEmailCode(ctx context.Context, actor *model.User, cookie string, req ProfileEmailCodeRequest) (*VerificationTicket, error) {
|
||||
return s.authDomain().SendProfileEmailCode(ctx, actor, cookie, req)
|
||||
}
|
||||
func (s *Service) ChangeProfileEmail(actor *model.User, cookie string, req ProfileEmailChangeRequest) (*ProfileEmailChangeResult, error) {
|
||||
return s.authDomain().ChangeProfileEmail(actor, cookie, req)
|
||||
}
|
||||
func (s *Service) BeginLinuxDOReauthentication(actor *model.User, cookie string) (string, error) {
|
||||
return s.authDomain().BeginLinuxDOReauthentication(actor, cookie)
|
||||
}
|
||||
func (s *Service) LinuxDOReauthenticationState(stateValue string) (bool, error) {
|
||||
return s.authDomain().LinuxDOReauthenticationState(stateValue)
|
||||
}
|
||||
Reference in new issue
Block a user