# custom-passport-strategy

> Custom passport strategy

Latest version **0.2.0** (published 2019-03-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install custom-passport-strategy
pnpm add custom-passport-strategy
yarn add custom-passport-strategy
bun add custom-passport-strategy
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-03-12 |
| First published | 2019-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 2 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Eric Lara |
| Maintainers | ericzon |
| Keywords | passport, strategy |

## Links

- npm: https://www.npmjs.com/package/custom-passport-strategy
- Repository: https://github.com/ericzon/custom-passport-strategy
- Homepage: https://github.com/ericzon/custom-passport-strategy#readme
- Issues: https://github.com/ericzon/custom-passport-strategy/issues
- npm.io page: https://npm.io/package/custom-passport-strategy

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^4.1.1
- [passport-strategy](https://npm.io/package/passport-strategy.md) ^1.0.0

## Alternatives

- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads
- [escher-request](https://npm.io/package/escher-request.md) — 545 weekly downloads

## Recent versions

- 0.2.0 (latest) — 2019-03-12
- 0.1.0 — 2019-03-10

## README

# custom-passport-strategy

[Passport](http://passportjs.org/) strategy for token authentication. 

It offers two built-in extractors:
- extractTokenFromHeader (by default)
- extractTokenFromCookie

It accepts an array of extractors, executed sequentially to get the token from incoming request.

```
const options = {
    ...
    extractor: [
        ExtractorHelper.extractTokenFromHeader,
        ExtractorHelper.extractTokenFromCookie
    ]
    ...
}

```

## Install

    $ npm install custom-passport-strategy

## Debug

This library uses debug logger to help with debugging tasks. Just enable logs with:
```
export DEBUG='strategy-lib:*'
```

## Development

    $ npm run format
    $ npm run lint

## License

[The MIT License](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/custom-passport-strategy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
