# @analyticshub/alfa-auth-server

> [@analyticshub/alfa-auth-server][server]

Latest version **0.0.10** (published 2021-05-26) · 0 weekly downloads

## Install

```sh
npm install @analyticshub/alfa-auth-server
pnpm add @analyticshub/alfa-auth-server
yarn add @analyticshub/alfa-auth-server
bun add @analyticshub/alfa-auth-server
```

Provides the command `alfa-auth-server`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.10 |
| Published | 2021-05-26 |
| First published | 2021-04-27 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 13 |
| Unpacked size | 38.7 KB |
| Known vulnerabilities | 0 (+6 in 3 direct dependencies) |
| Install scripts | no |
| Maintainers | aahub |

## Links

- npm: https://www.npmjs.com/package/@analyticshub/alfa-auth-server
- npm.io page: https://npm.io/package/@analyticshub/alfa-auth-server

## Dependencies (13)

- [pg](https://npm.io/package/pg.md) 8.6.0
- [cors](https://npm.io/package/cors.md) 2.8.5
- [uuid](https://npm.io/package/uuid.md) 8.3.2
- [yargs](https://npm.io/package/yargs.md) 16.2.0
- [crypto](https://npm.io/package/crypto.md) 1.0.1
- [dotenv](https://npm.io/package/dotenv.md) 9.0.2
- [ldapjs](https://npm.io/package/ldapjs.md) ^2.2.4
- [yamljs](https://npm.io/package/yamljs.md) 0.3.0
- [express](https://npm.io/package/express.md) 4.17.1
- [winston](https://npm.io/package/winston.md) 3.3.3
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) 8.5.1
- [swagger-ui-express](https://npm.io/package/swagger-ui-express.md) 4.1.6
- [@mojotech/json-type-validation](https://npm.io/package/@mojotech/json-type-validation.md) 3.1.0

## Recent versions

- 0.0.10 (latest) — 2021-05-26
- 0.0.9 — 2021-05-18
- 0.0.6 — 2021-05-14
- 0.0.3 — 2021-05-14
- 0.0.5 — 2021-05-13
- 0.0.2 — 2021-04-29
- 0.0.1 — 2021-04-27

## README

# Сервер авторизации

[@analyticshub/alfa-auth-server][server]

Сервер авторизации, работающий на основе подписанных алгоритмом RSA, JWT-токенов.

Содержит форму входа.

Клиентская библиотека [@analyticshub/alfa-auth-client][client]

#### Пример использования с установкой:
```bash
npm i

npm run generate-keys
npm run start
```

#### Пример использования без установки:

```bash
export AUTH_SETTING_PATH=ПУТЬ_ДО_ФАЙЛА_НАСТРОЕК

npx @analyticshub/alfa-auth-server --help
npx @analyticshub/alfa-auth-server generate-keys
npx @analyticshub/alfa-auth-server start
```

###### Файл настроек settings.json

```json
{
  "port": 3000,
  "pg": {
    "user": "postgres_username",
    "host": "111.111.111.111",
    "database": "postgres_database",
    "password": "postgres_password",
    "port": 5432
  },
  "auth": {
    "salt": "***salt***",
    "rsa_passphrase": "***passphrase***",
    "rsa_public_key_path": "path_to_public_key.pem",
    "rsa_private_key_path": "path_to_private_key.pem"
  }
}
```

[server]: https://www.npmjs.com/package/@analyticshub/alfa-auth-server
[client]: https://www.npmjs.com/package/@analyticshub/alfa-auth-client

####Настройки LDAP
Находятся в файле settings_ldap.json
Если файл и данные в нем существуют на клиенте будет отображено поле выбора из значений "title"
формат настроек
```ts
[
  {
    title: string;
    url: string;
    params: string;
  }
]
```

---
_Source: https://npm.io/package/@analyticshub/alfa-auth-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
