# feathers-authentication-hooks-apikey

> Add custom authentication to your data

Latest version **0.0.2** (published 2018-05-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install feathers-authentication-hooks-apikey
pnpm add feathers-authentication-hooks-apikey
yarn add feathers-authentication-hooks-apikey
bun add feathers-authentication-hooks-apikey
```

## 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.0.2 |
| Published | 2018-05-11 |
| First published | 2018-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.0.0 |
| Dependencies | 2 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Matt Chaffe |
| Maintainers | mattchewone |
| Keywords | feathers, feathers-plugin |

## Links

- npm: https://www.npmjs.com/package/feathers-authentication-hooks-apikey
- Repository: https://github.com/Mattchewone/feathers-authentication-hooks-apikey
- Issues: https://github.com/Mattchewone/feathers-authentication-hooks-apikey/issues
- npm.io page: https://npm.io/package/feathers-authentication-hooks-apikey

## Dependencies (2)

- [@feathersjs/errors](https://npm.io/package/@feathersjs/errors.md) ^3.3.0
- [feathers-hooks-common](https://npm.io/package/feathers-hooks-common.md) ^4.8.0

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [stockfish](https://npm.io/package/stockfish.md) — 27.0K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2018-05-11
- 0.0.1 — 2018-03-06

## README

# feathers-authentication-hooks-apikey

[![Build Status](https://travis-ci.org/Mattchewone/feathers-authentication-hooks-apikey.png?branch=master)](https://travis-ci.org/Mattchewone/feathers-authentication-hooks-apikey)
[![Code Climate](https://codeclimate.com/github/Mattchewone/feathers-authentication-hooks-apikey/badges/gpa.svg)](https://codeclimate.com/github/Mattchewone/feathers-authentication-hooks-apikey)
[![Test Coverage](https://codeclimate.com/github/Mattchewone/feathers-authentication-hooks-apikey/badges/coverage.svg)](https://codeclimate.com/github/Mattchewone/feathers-authentication-hooks-apikey/coverage)


> Add custom authentication to your data

## Installation

```
npm i feathers-authentication-hooks-apikey
```

## Documentation

TBD

## Complete Example

Here's an example hook adding authentication using `feathers-authentication-hooks-apikey`. 

```js
const { addAuthentication } = require('feathers-authentication-hooks-apikey')

module.exports = {
  before: {
    find: [ addAuthentication({ secret: 'my-super-secret' }) ],
    patch: [ addAuthentication({ secret: 'my-super-secret' }) ]
  }
}
```

Here's an example hook checking authentication using `feathers-authentication-hooks-apikey`. 

```js
const { authenticateFrom } = require('feathers-authentication-hooks-apikey')

module.exports = {
  before: {
    // if `required: false` it will not fail if the secret is not present
    find: [ authenticateFrom({ path: 'params.query', secret: 'my-super-secret', required: false }) ]
    patch: [ authenticateFrom({ path: 'data', secret: 'my-super-secret', required: true }) ]
  }
}
```

## License

Copyright (c) 2018

Licensed under the [MIT license](LICENSE).

---
_Source: https://npm.io/package/feathers-authentication-hooks-apikey · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
