Skip to content

Commit 16dea43

Browse files
authored
Merge pull request #8 from hyunmin0317/docs_issue_7
Docs issue 7
2 parents 6b60600 + 76e2690 commit 16dea43

File tree

2 files changed

+61
-4
lines changed

2 files changed

+61
-4
lines changed

README.md

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,61 @@
1-
# sangmyung-univ-auth
2-
### 상명대학교 재학생 인증 라이브러리
1+
# sangmyung-univ-auth ![Python versions](https://img.shields.io/badge/Python-3.9-blue) ![License](https://img.shields.io/badge/license-MIT-green) ![Release](https://img.shields.io/badge/release-0.0.1-red)
2+
상명대학교 재학생 인증 라이브러리
33

4-
---
4+
## Features
5+
- 상명대학교 재학생 여부를 간편하게 확인하는 라이브러리입니다.
6+
- 재학생 인증 방식은 상명대학교 e-Campus 세션 인증 방식입니다.
7+
8+
## Easy to install
9+
**Pip**: `pip install sangmyung-univ-auth`
10+
11+
**Direct:**
12+
- `git clone https://github.com/hyunmin0317/sangmyung-univ-auth`
13+
- `python setup.py install`
14+
15+
## Easy to use
16+
```python
17+
>>> from sangmyung_univ_auth import auth
18+
>>> result = auth('201911019', '<my-password>')
19+
>>> result
20+
AuthResponse(is_auth=True, code='success', body={'name': '최현민', 'department': '컴퓨터과학전공', 'email': 'choihm9903@naver.com'})
21+
>>> result.is_auth
22+
True
23+
>>> result.code
24+
'success'
25+
>>> result.body
26+
{'name': '최현민', 'department': '컴퓨터과학전공', 'email': 'choihm9903@naver.com'}
27+
```
28+
29+
## AuthResponse
30+
```python
31+
AuthResponse(
32+
is_auth=True,
33+
code='success',
34+
body={
35+
'name': '최현민',
36+
'department': '컴퓨터과학전공',
37+
'email': 'choihm9903@naver.com'
38+
}
39+
)
40+
```
41+
42+
- **is_auth: 인증 성공 여부**
43+
- Type: bool
44+
- Value
45+
- True: 인증 성공
46+
- False: 인증 실패
47+
- **code: Authenticator 반환 코드**
48+
- Type: str
49+
- Value
50+
- 'success': 인증에 성공할 경우
51+
- 'auth_failed': 인증에 실패할 경우
52+
- 'unknown_issue': 기타 라이브러리 오류
53+
- **body: 메타데이터**
54+
- Type: dict
55+
- Key
56+
- name: 이름
57+
- department: 학과
58+
- email: 이메일
59+
60+
## References
61+
- https://pypi.org/project/sangmyung-univ-auth/

sangmyung_univ_auth/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .auth import auth
22

3-
__VERSION__ = "0.0.0"
3+
__VERSION__ = "0.0.1"

0 commit comments

Comments
 (0)