feat: add get my password policy (#346)

* feat: add get my password policy

* fix: failed merges
This commit is contained in:
Fabi
2020-07-06 15:35:20 +02:00
committed by GitHub
parent 5251fc712c
commit 645c4597e8
14 changed files with 18263 additions and 16374 deletions
+8
View File
@@ -111,6 +111,14 @@ func (s *Server) ChangeMyPassword(ctx context.Context, request *PasswordChange)
return &empty.Empty{}, err
}
func (s *Server) GetMyPasswordComplexityPolicy(ctx context.Context, _ *empty.Empty) (*PasswordComplexityPolicy, error) {
policy, err := s.repo.GetMyPasswordComplexityPolicy(ctx)
if err != nil {
return nil, err
}
return passwordComplexityPolicyFromModel(policy), nil
}
func (s *Server) AddMfaOTP(ctx context.Context, _ *empty.Empty) (_ *MfaOtpResponse, err error) {
otp, err := s.repo.AddMyMfaOTP(ctx)
if err != nil {