care.emr.utils.mfa module

validate_temp_token(temp_token: str) tuple[RefreshToken, str]

Validate temporary token and return token object with user ID

check_mfa_ip_rate_limit(request)

Check IP-based rate limit

check_mfa_user_rate_limit(request, user_id: str)

Check user-based rate limit

create_auth_response(user: User) Response

Create authentication response with access and refresh tokens

verify_password(user: User, password: str)

Verify user password