# api-secure

> Server side router and client-side AJAX middleware for secure APIs

Latest version **0.0.1** (published 2018-10-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install api-secure
pnpm add api-secure
yarn add api-secure
bun add api-secure
```

## 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.1 |
| Published | 2018-10-01 |
| First published | 2018-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Scott Frees |
| Maintainers | freezer333 |

## Links

- npm: https://www.npmjs.com/package/api-secure
- Repository: https://github.com/freezer333/api-secure
- Homepage: https://github.com/freezer333/api-secure#readme
- Issues: https://github.com/freezer333/api-secure/issues
- npm.io page: https://npm.io/package/api-secure

## Recent versions

- 0.0.1 (latest) — 2018-10-01

## README

# api-secure
Server side router and client-side AJAX middleware for secure APIs

## Architecture
TBD

## Server route features
- Designed for Express
- Login route to return access/refresh tokens
- Refresh token route to acquire access token (http-only cookie)
- Middleware to check for valid access tokens and expose down chain
- Configurable data storage
- Rate limiter
- CSRF Support

## Client side features
- Designed for Axios
- Configs for attaching tokens to requests
- Interceptors for automatic access token refresh before expiration response
- In-memory storage of u/p, refresh token, access token
- Configurable callback on u/p needed for new refresh token
- Logout method
- CSRF Support

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