Skip to main content

Sangmyung University Students Account Authentication.

Project description

sangmyung-univ-auth Python versions License Release

상명대학교 재학생 인증 라이브러리

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": "<비밀번호>"
      }
      
  • 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": "아이디 및 비밀번호가 일치하지 않습니다."
          }
      }
      

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sangmyung-univ-auth-1.2.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sangmyung_univ_auth-1.2.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file sangmyung-univ-auth-1.2.2.tar.gz.

File metadata

  • Download URL: sangmyung-univ-auth-1.2.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for sangmyung-univ-auth-1.2.2.tar.gz
Algorithm Hash digest
SHA256 28500e7ad20286d40278ccf5a085f4c52ecf20c53ec14d35b74e3655223772b3
MD5 e6a56e5241f8592c28ef4466a61e7e0c
BLAKE2b-256 10e6f89cced82ba3679e9c4ca9dde688b217e2057ded56b05f84df17c1674b51

See more details on using hashes here.

File details

Details for the file sangmyung_univ_auth-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for sangmyung_univ_auth-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0025ddbfa06550cacd3a80634e3d4facc4cb13915fa983b0e624029ae1baaa28
MD5 8b1030be6216574d9a1759b9f3a58eee
BLAKE2b-256 c9a4488badb9ac50046f1e88628deb9eaf8c6a9be5a0207495809302066c39c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page