1
0
forked from baron/baron-sso

Refactor password reset flow

This commit is contained in:
Lectom C Han
2026-01-27 11:16:44 +09:00
committed by kyy
parent 739da39a61
commit 72a36701da
9 changed files with 606 additions and 149 deletions

View File

@@ -2,6 +2,7 @@ package validator
import (
"baron-sso-backend/internal/domain"
"net/http"
"testing"
)
@@ -20,6 +21,19 @@ func (m *MockProvider) GetMetadata() (*domain.IDPMetadata, error) {
}, nil
}
// Stub implementations to satisfy the IdentityProvider interface for this unit test.
func (m *MockProvider) InitiatePasswordReset(loginID, redirectUrl string) error {
return nil
}
func (m *MockProvider) VerifyPasswordResetToken(token string) (*domain.AuthInfo, error) {
return &domain.AuthInfo{}, nil
}
func (m *MockProvider) UpdateUserPassword(loginID, newPassword string, r *http.Request) error {
return nil
}
func TestValidateIDPCompatibility(t *testing.T) {
// BrokerUser 모델은 다음과 같이 정의되어 있다고 가정합니다 (idp_models.go 참조):
// ID (required), Email (required), Name, PhoneNumber