export declare const docOneLine = "2FA, Pin Code Auth and biometric authentication"; export declare const documentation = "\n# GDdoubleAuthentication Plugin\n\n## Features\n\n- Multiple authentication methods:\n - Two-Factor Authentication (2FA)\n - PIN code authentication\n - Biometric authentication\n- Configurable security settings:\n - Number of allowed attempts before lockout\n - Lockout duration\n - PIN code length customization\n- Anti-timing attack protection\n- Automatic attempt tracking and reset\n- User lockout mechanism after multiple failed attempts\n\n## Configuration\n\nThe plugin can be configured with the following options:\n\n```typescript\n{\n enable: boolean, // Enable/disable the plugin\n nbAttemptsForAuth?: { // Number of allowed attempts per auth method\n '2FA'?: number, // Default: 3\n biometricAuthToken?: number, // Default: 3\n pincode?: number // Default: 3\n },\n resetTimeMinutesForSecureConnexion?: number, // Lockout duration in minutes (Default: 15)\n pinCodeLength?: number // Length of PIN code (Default: 4)\n}\n```\n\n## Usage\n\nThe plugin automatically hooks into the login process and requires one of the following headers in the request:\n- `biometricAuthToken`: For biometric authentication\n- `pincode`: For PIN code authentication\n- `2FA`: For two-factor authentication\n\n## Security Features\n\n1. **Attempt Tracking**: Each authentication method tracks failed attempts separately\n2. **Automatic Lockout**: Users are locked out after exceeding the configured number of attempts\n3. **Time-based Reset**: Failed attempt counters reset after the configured lockout period\n4. **Anti-Timing Attack**: Random delays are added to prevent timing-based attacks\n5. **Secure Storage**: PIN codes are encrypted using bcrypt\n\n## User Fields\n\nThe plugin adds the following fields to the user model:\n- PIN Code related:\n - `pinCode`: Encrypted PIN code\n - `pinCodeRetrialNb`: Number of failed PIN attempts\n - `lastPincodeCompareTime`: Timestamp of last PIN verification\n- 2FA related:\n - `_2FAcode`: Current 2FA code\n - `_2FAretrialNb`: Number of failed 2FA attempts\n - `last2FACompareTime`: Timestamp of last 2FA verification\n- Biometric related:\n - `biometricAuthToken`: Biometric authentication token\n - `biometricAuthRetrialNb`: Number of failed biometric attempts\n - `lastBiometricCompareTime`: Timestamp of last biometric verification\n\n## Error Handling\n\nThe plugin throws the following errors:\n- `wrongToken`: When an invalid authentication token is provided\n- `tooManyAttempsForSecureAuthentication`: When the maximum number of attempts is exceeded\n";