# fly-in-sso

> koa middleware for iflytek-in sso

Latest version **1.0.5** (published 2021-05-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install fly-in-sso
pnpm add fly-in-sso
yarn add fly-in-sso
bun add fly-in-sso
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2021-05-16 |
| First published | 2021-02-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | htyu4 |
| Maintainers | feiyuerenhai |
| Keywords | koa, middleware, iflytek, sso |

## Links

- npm: https://www.npmjs.com/package/fly-in-sso
- npm.io page: https://npm.io/package/fly-in-sso

## Dependencies (6)

- [url](https://npm.io/package/url.md) ^0.11.0
- [debug](https://npm.io/package/debug.md) ^4.3.1
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.23
- [lodash.get](https://npm.io/package/lodash.get.md) ^4.4.2
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1
- [path-to-regexp](https://npm.io/package/path-to-regexp.md) ^6.2.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2021-05-16
- 1.0.4 — 2021-05-16
- 1.0.1 — 2021-02-03

## README

# fly-in-sso

koa middlwware for iflytek-in sso

## Installation

```bash
# npm
$ npm install fly-in-sso
# yarn
$ yarn add fly-in-sso
```

## Example

```js
// 配置项
const option = {
    loginPath: '/login', // 静默登入
    logoutPath: '/logout',
    checkLoginStateUrl: (signId, loginUserAccount) => `https://ssoqxb.iflytek.com:8443/sso/loginState/check?userSignId=${signId}&userAccount=${loginUserAccount}`,
    loginUrl: path => `https://ssoqxb.iflytek.com:8443/sso/login?service=${path}`,
    logoutUrl: path => `https://ssoqxb.iflytek.com:8443/sso/logout?service=${path}`,
    validateTicketUrl: (path, ticket) => `https://ssoqxb.iflytek.com:8443/sso/p3/serviceValidate?service=${path}&ticket=${ticket}`,
    forceSyncLoginState: false, // 强制与sso中心保持时时同步
    ignore: [
        '/favicon.ico',
        '/public/:key*',
        '/uploads/:key*',
        '/',
        '/index.html',
        '/list',
        '/detail.html',
        '/detail'
    ],
}

const sso = require('fly-in-sso');
const Koa = require('koa');
const app = new Koa();

app.use(sso(option));

app.listen(3000);

```

## License

[MIT](LICENSE)

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