Skip to main content

pyramid_vgid_oauth2

Project description

Thư viện cho phép pyramid login thông qua https://id.vatgia.com một cách nhanh chóng

Usage

Để sử dụng, thêm dòng sau đây vào hàm main(…):

config.include(“pyramid_vgid_oauth2”)

Trong development.ini

pyramid_vgid_oauth2.client_id = {Client ID cấp bởi VGID} pyramid_vgid_oauth2.client_secret = {Client Secret cấp bởi VGID} pyramid_vgid_oauth2.put_user_callback = Đường dẫn đến hàm sẽ được gọi để tạo mới User pyramid_vgid_oauth2.base_url = /vgid/oauth (đường dẫn dùng để login trên web hiện tại)

### Callback để tạo mới User

def put_user_callback(acc):

“”” :type acc: dict :return object phai co 1 field la .id “”” pass

### API

request.vgid_access_token

có thể dùng để lấy access_token khi đã đăng nhập

#### Event

  1. pyramid_vgid_oauth2.events.SignIn

  2. pyramid_vgid_oauth2.events.SignOut

1.0

  • Packaging

  • Initial version

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

pyramid_vgid_oauth2-1.0.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file pyramid_vgid_oauth2-1.0.tar.gz.

File metadata

File hashes

Hashes for pyramid_vgid_oauth2-1.0.tar.gz
Algorithm Hash digest
SHA256 8f81d7ecd249da66821955f00965088eff88d00f3325693434c0af7897b3452b
MD5 1000d6f36a18e854197f75720651b127
BLAKE2b-256 03f142fd597e10c22f0d1fc29df68912a8b3ac0b2873059600d5d7c03662b814

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