forked from baron/baron-sso
Refactor password reset flow
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user