Sangmyung University Students Account Authentication.
Project description
sangmyung-univ-auth
상명대학교 재학생 인증 라이브러리
Features
- 상명대학교 재학생 여부를 간편하게 확인하는 라이브러리입니다.
- 재학생 인증 방식은 상명대학교 포털 SSO 인증 방식입니다.
Easy to install
Pip: pip install sangmyung-univ-auth
Direct:
git clone https://github.com/hyunmin0317/sangmyung-univ-auth
python setup.py install
Easy to use
>>> from sangmyung_univ_auth import auth
>>> result = auth('201911019', '<my-password>')
>>> result
AuthResponse(is_auth=True, code='success', body={'name': '최현민', 'department': '컴퓨터과학전공', 'email': 'choihm9903@naver.com'})
>>> result.is_auth
True
>>> result.code
'success'
>>> result.body
{'name': '최현민', 'department': '컴퓨터과학전공', 'email': 'choihm9903@naver.com'}
AuthResponse
AuthResponse(
is_auth=True,
code='success',
body={
'name': '최현민',
'department': '컴퓨터과학전공',
'email': 'choihm9903@naver.com'
}
)
- is_auth: 인증 성공 여부
- Type: bool
- Value
- True: 인증 성공
- False: 인증 실패
- code: Authenticator 반환 코드
- Type: str
- Value
- 'success': 인증에 성공할 경우
- 'auth_failed': 인증에 실패할 경우
- 'unknown_issue': 기타 라이브러리 오류
- body: 메타데이터
- Type: dict
- Key
- name: 이름
- department: 학과
- email: 이메일
Sangmyung University Auth API
-
Request
- URL
https://smunity.co.kr/api/auth
- Method
POST
- Body
{ "username": "<학번>", "password": "<비밀번호>" }
- URL
-
Response
- Success: 200 OK
{ "is_auth": true, "code": "success", "body": { "name": "최현민", "department": "컴퓨터과학전공", "email": "choihm9903@naver.com" } }
- Fail: 401 Unauthorized
{ "is_auth": false, "code": "auth_failed", "body": { "message": "아이디 및 비밀번호가 일치하지 않습니다." } }
- Success: 200 OK
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for sangmyung-univ-auth-1.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8bed7c3fcf69b4b90c351981e4e3a5ae1d2f51ce38c15cc0abdcda0bbf80280 |
|
MD5 | 305b90d565f5213632b7ef0020916d37 |
|
BLAKE2b-256 | 0faf8fcd5a499da35355acb8122e9f2d73b74b5c798a42d1d9a98a8338ce9c8b |
Close
Hashes for sangmyung_univ_auth-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ed7e3fa8c951c9b0a302c3d6f7d93a0736a14cba22798eb28e1128da30684a6 |
|
MD5 | 93bdda6787d9db7335908665a4acb79d |
|
BLAKE2b-256 | c7acb54a0501dc0ba02a72ba53f5ecec4fdfc56b5c8388f4dcc6638acdc7a29f |