Skip to main content

A package for authenticating with SCAU JWXT system.

Project description

SCAU JWXT Auth

用于华南农业大学教务系统(SCAU JWXT)的身份认证库,可以一键获取鉴权所需的 Cookie 和 Headers,全天可用,自动处理夜间需要 VPN 的情况。

安装

pip install scau-jwxt-auth

使用方法

from scau_jwxt_auth import JWXT

# 初始化 JWXT 实例
client = JWXT(user_code="your_student_id", password="your_password",  sso_password="your_sso_password")

import time
import requests

# 获取用户信息
url = (f"{client.base_url}/secService/assert.json?"
"resourceCode=resourceCode&"
"apiCode=framework.sign.controller.SignController.asserts&"
f"t={int(time.time()*1000)}&sf_request_type=ajax"
)
session = requests.Session()
session.verify = False
session.cookies.update(client.get_cookies())
session.headers.update(client.get_headers())
response = session.get(url, timeout=15)
response.raise_for_status()

# 打印用户信息
print(response.json())

许可证

AGPLv3

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

scau_jwxt_auth-0.1.1.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

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

scau_jwxt_auth-0.1.1-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file scau_jwxt_auth-0.1.1.tar.gz.

File metadata

  • Download URL: scau_jwxt_auth-0.1.1.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for scau_jwxt_auth-0.1.1.tar.gz
Algorithm Hash digest
SHA256 35ba25eec8bcabb0b8f69baa49498e2ed647cdac91894f619ce7b881254cc706
MD5 da984f004bf2b5d82bd115a36ad7d9cc
BLAKE2b-256 48d2b177c182e109dcdac8db6165e3f9c25777dc3b460c23a05b278f42cb1b64

See more details on using hashes here.

Provenance

The following attestation bundles were made for scau_jwxt_auth-0.1.1.tar.gz:

Publisher: python-package.yml on CberYellowstone/SCAU_JWXT_Auth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scau_jwxt_auth-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: scau_jwxt_auth-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for scau_jwxt_auth-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98ca1f1ea56a93d2759fde8057632f60939538234821484ee4da46f5757d9d44
MD5 acc677dabe17f689de4d3d956a6e947d
BLAKE2b-256 1b5df4d6ef247102d49c4c57d712c60864f7f1e01593af2a89ad9266cdc6bf8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for scau_jwxt_auth-0.1.1-py3-none-any.whl:

Publisher: python-package.yml on CberYellowstone/SCAU_JWXT_Auth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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