1.0.35 • Published 4 years ago

@experium/nest-bruteforce-guard v1.0.35

Weekly downloads
42
License
MIT
Repository
github
Last release
4 years ago

Installation

# Locally in your project.
npm install @experium/nest-bruteforce-guard

Configuration

import { BruteforceGuardModule } from 'nest-bruteforce-guard';

@Module({
    imports: [
        //...
        BruteforceGuardModule.setUp({
            attemptMinutesByLogin: 120,
            attemptMinutesByIp: 30,
            attemptCountByLogin: 5,
            attemptCountByIp: 10,
        })
    ],
})
export class ApplicationModule {
}

Usage

### Save attempt when login failed by password
await this.bruteforceGuard.saveLoginAttempt(user.username, request.ip);

### Clear attempts when login success
await this.bruteforceGuard.clearLoginAttempts(user.username, request.ip);
1.0.33

4 years ago

1.0.35

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.29

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.19

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.20

4 years ago

1.0.15

4 years ago

1.0.12

4 years ago

1.0.8

4 years ago