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.1.1

  • Add warning for put_user_callback configuration

  • Accept callable configuration for put_user_callback

1.1

  • Add python3 support

1.0.x

  • 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.1.1.tar.gz (4.2 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for pyramid_vgid_oauth2-1.1.1.tar.gz
Algorithm Hash digest
SHA256 f8e093ccb6a8bb8c579d7df86b5759580aa5e1d00b8fcd591eac2e55530362d4
MD5 3e908f501e96ba3d6e24147e077970c5
BLAKE2b-256 7fee2b129768815878f548c44866d2bd5ca7552523efb2b3a021895c42ba0780

See more details on using hashes here.

Supported by

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