@scolastico-dev/open-altcha
    Preparing search index...

    Interface DomainConfig

    interface DomainConfig {
        challengeExpiresSeconds: number;
        challengeRequestPenalty: number;
        codeVerificationIfStrengthGT: number;
        codeVerificationLength: number;
        enableAbuseIPDB: boolean;
        enableDisposableEmailCheck: boolean;
        enableSpamhaus: boolean;
        forwardHost?: string;
        highFailureRateIncrease: number;
        highFailureRateThreshold: number;
        key: string;
        manyAttemptsIncrease: number;
        manyAttemptsThreshold: number;
        maxStrength: number;
        mediumFailureRateIncrease: number;
        mediumFailureRateThreshold: number;
        minStrength: number;
        name: string;
        origins: string[];
        verifyIpAddress: boolean;
    }
    Index

    Properties

    challengeExpiresSeconds: number

    Challenge expiration time in seconds (60 to 3600).

    DOMAIN__CHALLENGE_EXPIRES_SECONDS

    300
    
    DOMAIN_EXAMPLE_CHALLENGE_EXPIRES_SECONDS=300
    
    challengeRequestPenalty: number

    Penalty points for challenge requests (0 to Number.MAX_SAFE_INTEGER).

    DOMAIN__CHALLENGE_REQUEST_PENALTY

    5
    
    DOMAIN_EXAMPLE_CHALLENGE_REQUEST_PENALTY=5
    
    codeVerificationIfStrengthGT: number

    Enable code verification if strength is greater than this value (-1 to 100).

    DOMAIN__CODE_VERIFICATION_IF_STRENGTH_GT

    70
    
    DOMAIN_EXAMPLE_CODE_VERIFICATION_IF_STRENGTH_GT=70
    
    codeVerificationLength: number

    Length of verification code (4 to 10).

    DOMAIN__CODE_VERIFICATION_LENGTH

    6
    
    DOMAIN_EXAMPLE_CODE_VERIFICATION_LENGTH=6
    
    enableAbuseIPDB: boolean

    Enable AbuseIPDB checking for this domain.

    DOMAIN__ENABLE_ABUSEIPDB

    false
    
    DOMAIN_EXAMPLE_ENABLE_ABUSEIPDB=true
    
    enableDisposableEmailCheck: boolean

    Enable disposable email checking for this domain.

    DOMAIN__ENABLE_DISPOSABLE_EMAIL_CHECK

    false
    
    DOMAIN_EXAMPLE_ENABLE_DISPOSABLE_EMAIL_CHECK=true
    
    enableSpamhaus: boolean

    Enable Spamhaus checking for this domain.

    DOMAIN__ENABLE_SPAMHAUS

    false
    
    DOMAIN_EXAMPLE_ENABLE_SPAMHAUS=true
    
    forwardHost?: string

    Host to forward requests to (optional).

    DOMAIN__FORWARD_HOST

    DOMAIN_EXAMPLE_FORWARD_HOST=https://api.example.com
    
    highFailureRateIncrease: number

    Strength increase for high failure rate (0 to Number.MAX_SAFE_INTEGER).

    DOMAIN__HIGH_FAILURE_RATE_INCREASE

    30
    
    DOMAIN_EXAMPLE_HIGH_FAILURE_RATE_INCREASE=30
    
    highFailureRateThreshold: number

    Threshold for high failure rate (0 to 1).

    DOMAIN__HIGH_FAILURE_RATE_THRESHOLD

    0.5
    
    DOMAIN_EXAMPLE_HIGH_FAILURE_RATE_THRESHOLD=0.5
    
    key: string

    Secret key for the domain.

    DOMAIN__KEY

    DOMAIN_EXAMPLE_KEY=your-secret-key
    
    manyAttemptsIncrease: number

    Strength increase for many attempts (0 to Number.MAX_SAFE_INTEGER).

    DOMAIN__MANY_ATTEMPTS_INCREASE

    10
    
    DOMAIN_EXAMPLE_MANY_ATTEMPTS_INCREASE=10
    
    manyAttemptsThreshold: number

    Threshold for many attempts (0 to Number.MAX_SAFE_INTEGER).

    DOMAIN__MANY_ATTEMPTS_THRESHOLD

    10
    
    DOMAIN_EXAMPLE_MANY_ATTEMPTS_THRESHOLD=10
    
    maxStrength: number

    Maximum challenge strength (0 to Number.MAX_SAFE_INTEGER).

    DOMAIN__MAX_STRENGTH

    90
    
    DOMAIN_EXAMPLE_MAX_STRENGTH=80
    
    mediumFailureRateIncrease: number

    Strength increase for medium failure rate (0 to Number.MAX_SAFE_INTEGER).

    DOMAIN__MEDIUM_FAILURE_RATE_INCREASE

    15
    
    DOMAIN_EXAMPLE_MEDIUM_FAILURE_RATE_INCREASE=15
    
    mediumFailureRateThreshold: number

    Threshold for medium failure rate (0 to 1).

    DOMAIN__MEDIUM_FAILURE_RATE_THRESHOLD

    0.3
    
    DOMAIN_EXAMPLE_MEDIUM_FAILURE_RATE_THRESHOLD=0.3
    
    minStrength: number

    Minimum challenge strength (0 to Number.MAX_SAFE_INTEGER).

    DOMAIN__MIN_STRENGTH

    10
    
    DOMAIN_EXAMPLE_MIN_STRENGTH=20
    
    name: string

    The domain identifier name.

    origins: string[]

    Comma-separated list of allowed origins for this domain.

    DOMAIN__ORIGINS

    DOMAIN_EXAMPLE_ORIGINS=https://example.com,https://www.example.com
    
    verifyIpAddress: boolean

    Whether to verify IP address.

    DOMAIN__VERIFY_IP_ADDRESS

    true
    
    DOMAIN_EXAMPLE_VERIFY_IP_ADDRESS=true