Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
feat: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
beetcb committed Dec 18, 2020
1 parent 8b50ef7 commit e4cc9b4
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 4 deletions.
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## About

**`campushpere-auth-simplified`** 使用交互式的配置程序,实现了学工系统的登录,返回的 `cookie` 可直接用于学工系统或今日校园相关验证,基于此可以开发更多强大工具集 ( 例如本项目提供的 [今日校园自动签到] 示例 )

## Prerequisites

- NodeJs
- Git

## Get started

1. 安装此项目

```sh
git clone https://git.io/JL4oc
cd campushpere-auth-simplified && chmod +x init.js
```

2. 初始化学校及用户

- 学校配置:

```sh
./init.js -s
```

- 用户配置:

```sh
./init.js -u

```

- 使用文件配置用户: 根目录下创建 `userConf.yml`, 参考以下示例:

```yml
# 支持多用户配置,用多数组实现
- username: 11111111
password: 1
alias: beetcb
- username: 22222222
password: 2
alias: beet
```

2. 工具构建:
你可以基于本项目完成相应工具开发, 本项目提供 **今日校园自动签到** 示例:
执行主程序可自动签到

```sh
node index.js
```

## Features

- 交互式配置: `campushpere-awesome-auth` 提供交互式的命令行完成 用户 及 学校 的配置,同时也支持使用 `yml` 文件来配置
- 验证持久化: 缓存验证信息于 cookie , 只在失效时更新

## Thanks

登录中加密过程大量参考 [wisedu-unified-login-api](https://github.com/ZimoLoveShuang/wisedu-unified-login-api) 项目,在此感谢
File renamed without changes.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "whpu-cas-login-in",
"name": "campushpere-auth-simplified",
"version": "1.0.0",
"description": "auto login in ",
"main": "main.js",
"description": "login to swms at ease",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"whpu"
"javascript"
],
"author": "beetcb",
"license": "ISC",
Expand Down

0 comments on commit e4cc9b4

Please sign in to comment.