Open edX OAuth2 Backend for Wordpress
=====================================
.. image:: https://img.shields.io/static/v1?label=pypi&style=flat-square&color=0475b6&message=edx-oauth2-wordpress-backend
:alt: PyPi edx-oauth2-wordpress-backend
:target: https://pypi.org/project/edx-oauth2-wordpress-backend/
.. image:: https://img.shields.io/badge/hack.d-Lawrence%20McDaniel-orange.svg
:target: https://lawrencemcdaniel.com
:alt: Hack.d Lawrence McDaniel
.. image:: https://img.shields.io/static/v1?logo=discourse&label=Discussions&style=flat-square&color=ff0080&message=OpenEdx
:alt: Open edX Discussions
:target: https://discuss.openedx.org/
.. image:: https://img.shields.io/static/v1?label=WP-Oauth&style=flat-square&color=1054ff&message=Server
:alt: WP Oauth
:target: https://wp-oauth.com/
|
Overview
--------
An Open edX oauth2 backend for `Wordpress <https://wordpress.org//>`_ `WP OAuth Server <https://wp-oauth.com/>`_.
- `Python Social Auth custom backend implentation <https://python-social-auth.readthedocs.io/en/latest/backends/implementation.html>`_
- `WP Oauth Wordpress Plugin Documentation <https://wp-oauth.com/docs/>`_
This is a strongly-typed implementation that leverages an in-depth knowledge of the WP Oauth return objects
to generate verbose, informative log data in `lms.log <./doc/lms.log>`_ that will help you to quickly get third party authentication
working on your Open edX installation.
Usage
-----
An example implementation for an Open edX installation named https://stepwisemath.ai/
1. add this package to your project's requiremets
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
add this package to your project's requiremets.txt, or install it from the command line.
.. code-block:: shell
pip install edx-oauth2-wordpress-backend
2. subclass WPOpenEdxOAuth2
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Subclass oauth2_wordpress.wp_oauth.WPOpenEdxOAuth2, and configure for your Wordpress oauth provider.
.. code-block:: python
from oauth2_wordpress.wp_oauth import WPOpenEdxOAuth2
class StepwiseMathWPOAuth2(WPOpenEdxOAuth2):
# This defines the backend name and identifies it during the auth process.
# The name is used in the URLs /login/<backend name> and /complete/<backend name>.
#
# This is the string value that will appear in the LMS Django Admin
# Third Party Authentication / Provider Configuration (OAuth)
# setup page drop-down box titled, "Backend name:", just above
# the "Client ID:" and "Client Secret:" fields.
name = "stepwisemath-oauth"
# note: no slash at the end of the base url. Python Social Auth
# might clean this up for you, but i'm not 100% certain of that.
#
# the following will create an authorization url of https://stepwisemath.ai/wp-json/moserver/authorize
BASE_URL = "https://stepwisemath.ai"
PATH = "wp-json/moserver/"
AUTHORIZATION_ENDPOINT = "authorize"
TOKEN_ENDPOINT = "token"
USERINFO_ENDPOINT = "resource"
3. configure your Open edX lms application
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: yaml
ADDL_INSTALLED_APPS:
- "oauth2_wordpress"
THIRD_PARTY_AUTH_BACKENDS:
- "oauth2_wordpress.wp_oauth.StepwiseMathWPOAuth2"
ENABLE_REQUIRE_THIRD_PARTY_AUTH: true
add these settings to django.conf:
.. list-table:: WP Oauth setup
:widths: 50 100
:header-rows: 1
* - Key
- Value
* - WPOAUTH_BACKEND_BASE_URL
- https://stepwisemath.ai
* - WPOAUTH_BACKEND_CLIENT_ID
- see: https://stepwisemath.ai/wp-admin/admin.php?page=mo_oauth_server_settings
* - WPOAUTH_BACKEND_CLIENT_SECRET
- see: https://stepwisemath.ai/wp-admin/admin.php?page=mo_oauth_server_settings
* - SCOPE
- basic email profile
* - GRANT_TYPE
- Authorization Code
* - REDIRECT_URI
- https://web.stepwisemath.ai/auth/complete/stepwisemath-oauth
4. Configure a new Oauth2 client from the lms Django Admin console
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. image:: https://raw.githubusercontent.com/lpm0073/edx-oauth2-wordpress-backend/main/doc/django-admin-1.png
:width: 100%
:alt: Open edX Django Admin Add Provider Configuration (OAuth)
.. image:: https://raw.githubusercontent.com/lpm0073/edx-oauth2-wordpress-backend/main/doc/django-admin-2.png
:width: 100%
:alt: Open edX Django Admin Add Provider Configuration (OAuth)
Cookiecutter openedx_devops deployment
.. code-block:: shell
tutor config save --set OPENEDX_WPOAUTH_BACKEND_BASE_URL="${{ secrets.WPOAUTH_BACKEND_BASE_URL }}" \
--set OPENEDX_WPOAUTH_BACKEND_CLIENT_ID="${{ secrets.WPOAUTH_BACKEND_CLIENT_ID }}" \
--set OPENEDX_WPOAUTH_BACKEND_CLIENT_SECRET="${{ secrets.WPOAUTH_BACKEND_CLIENT_SECRET }}"
WP Oauth Plugin Configuration
-----------------------------
This plugin enables your Open edX installation to authenticate against the WP Oauth plugin provider
in your Wordpress web site, configured as follows:
.. image:: https://raw.githubusercontent.com/lpm0073/edx-oauth2-wordpress-backend/main/doc/wp-oauth-config.png
:width: 100%
:alt: WP OAuth Server configuration page
Sample lms log output
---------------------
.. code-block:: shell
2022-10-06 20:17:08,832 INFO 19 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {"name": "/auth/login/stepwisemath-oauth/", "context": {"user_id": null, "path": "/auth/login/stepwisemath-oauth/", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "a3f4ac2a5bf97f717f5745984059891b", "ip": "192.168.6.26", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", "host": "web.stepwisemath.ai", "referer": "https://web.stepwisemath.ai/login", "accept_language": "en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6", "event": "{\"GET\": {\"auth_entry\": [\"login\"], \"next\": [\"/dashboard\"]}, \"POST\": {}}", "time": "2022-10-06T20:17:08.832684+00:00", "event_type": "/auth/login/stepwisemath-oauth/", "event_source": "server", "page": null}
2022-10-06 20:17:09,230 INFO 19 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:216 - AUTHORIZATION_URL: https://stepwisemath.ai/oauth/authorize
[pid: 19|app: 0|req: 2/19] 192.168.4.4 () {68 vars in 1889 bytes} [Thu Oct 6 20:17:08 2022] GET /auth/login/stepwisemath-oauth/?auth_entry=login&next=%2Fdashboard => generated 0 bytes in 430 msecs (HTTP/1.1 302) 9 headers in 922 bytes (1 switches on core 0)
2022-10-06 20:17:38,485 INFO 7 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {"name": "/auth/complete/stepwisemath-oauth/", "context": {"user_id": null, "path": "/auth/complete/stepwisemath-oauth/", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "a3f4ac2a5bf97f717f5745984059891b", "ip": "192.168.6.26", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", "host": "web.stepwisemath.ai", "referer": "https://stepwisemath.ai/", "accept_language": "en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6", "event": "{\"GET\": {\"redirect_state\": [\"pdbIKIcEbhjVr3Kon5VXUWWiy5kuX921\"], \"code\": [\"q0antmap4qfamd6pe24jh75pdprahpdiyitmut0o\"], \"state\": [\"pdbIKIcEbhjVr3Kon5VXUWWiy5kuX921\"], \"iframe\": [\"break\"]}, \"POST\": {}}", "time": "2022-10-06T20:17:38.484675+00:00", "event_type": "/auth/complete/stepwisemath-oauth/", "event_source": "server", "page": null}
2022-10-06 20:17:38,496 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:223 - ACCESS_TOKEN_URL: https://stepwisemath.ai/oauth/token
2022-10-06 20:17:40,197 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:230 - USER_QUERY: https://stepwisemath.ai/oauth/me
2022-10-06 20:17:40,197 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:363 - user_data() url: https://stepwisemath.ai/oauth/me?access_token=jx2zql9fw2jx9s7tayik4ybfjrmuhb7m5csb1mtl
2022-10-06 20:17:41,965 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:368 - user_data() response: {
"ID": "7",
"display_name": "Test McBugster",
"user_email": "test@stepwisemath.ai",
"user_login": "testaccount",
"user_nicename": "testaccount",
"user_registered": "2022-10-06 19:57:56",
"user_roles": [
"administrator"
],
"user_status": "0"
}
2022-10-06 20:17:41,966 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:269 - get_user_details() received wp-oauth user data response json dict: {
"ID": "7",
"display_name": "Test McBugster",
"user_email": "test@stepwisemath.ai",
"user_login": "testaccount",
"user_nicename": "testaccount",
"user_registered": "2022-10-06 19:57:56",
"user_roles": [
"administrator"
],
"user_status": "0"
}
2022-10-06 20:17:41,966 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:317 - get_user_details() processing response object
2022-10-06 20:17:41,966 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:241 - user_details.setter: new value set {
"date_joined": "2022-10-06 19:57:56",
"email": "test@stepwisemath.ai",
"first_name": "Test",
"fullname": "Test McBugster",
"id": 7,
"is_staff": true,
"is_superuser": true,
"last_name": "McBugster",
"refresh_token": "",
"scope": "",
"token_type": "",
"user_status": "0",
"username": "testaccount"
}
2022-10-06 20:17:41,967 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:345 - get_user_details() returning: {
"date_joined": "2022-10-06 19:57:56",
"email": "test@stepwisemath.ai",
"first_name": "Test",
"fullname": "Test McBugster",
"id": 7,
"is_staff": true,
"is_superuser": true,
"last_name": "McBugster",
"refresh_token": "",
"scope": "",
"token_type": "",
"user_status": "0",
"username": "testaccount"
}
2022-10-06 20:17:41,972 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:269 - get_user_details() received extended get_user_details() return dict: {
"access_token": "jx2zql9fw2jx9s7tayik4ybfjrmuhb7m5csb1mtl",
"date_joined": "2022-10-06 19:57:56",
"email": "test@stepwisemath.ai",
"expires_in": 3600,
"first_name": "Test",
"fullname": "Test McBugster",
"id": 7,
"is_staff": true,
"is_superuser": true,
"last_name": "McBugster",
"refresh_token": "",
"scope": "",
"token_type": "",
"user_status": "0",
"username": "testaccount"
}
2022-10-06 20:17:41,973 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:241 - user_details.setter: new value set {
"access_token": "jx2zql9fw2jx9s7tayik4ybfjrmuhb7m5csb1mtl",
"date_joined": "2022-10-06 19:57:56",
"email": "test@stepwisemath.ai",
"expires_in": 3600,
"first_name": "Test",
"fullname": "Test McBugster",
"id": 7,
"is_staff": true,
"is_superuser": true,
"last_name": "McBugster",
"refresh_token": "",
"scope": "",
"token_type": "",
"user_status": "0",
"username": "testaccount"
}
2022-10-06 20:17:41,973 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:290 - get_user_details() returning extended get_user_details() return dict: {
"access_token": "jx2zql9fw2jx9s7tayik4ybfjrmuhb7m5csb1mtl",
"date_joined": "2022-10-06 19:57:56",
"email": "test@stepwisemath.ai",
"expires_in": 3600,
"first_name": "Test",
"fullname": "Test McBugster",
"id": 7,
"is_staff": true,
"is_superuser": true,
"last_name": "McBugster",
"refresh_token": "",
"scope": "",
"token_type": "",
"user_status": "0",
"username": "testaccount"
}
[pid: 7|app: 0|req: 2/20] 192.168.4.4 () {70 vars in 2136 bytes} [Thu Oct 6 20:17:38 2022] GET /auth/complete/stepwisemath-oauth/?redirect_state=pdbIKIcEbhjVr3Kon5VXUWWiy5kuX921&code=q0antmap4qfamd6pe24jh75pdprahpdiyitmut0o&state=pdbIKIcEbhjVr3Kon5VXUWWiy5kuX921&iframe=break => generated 0 bytes in 3549 msecs (HTTP/1.1 302) 9 headers in 612 bytes (1 switches on core 0)
2022-10-06 20:17:42,211 INFO 19 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {"name": "/register", "context": {"user_id": null, "path": "/register", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "a3f4ac2a5bf97f717f5745984059891b", "ip": "192.168.6.26", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", "host": "web.stepwisemath.ai", "referer": "https://stepwisemath.ai/", "accept_language": "en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2022-10-06T20:17:42.211436+00:00", "event_type": "/register", "event_source": "server", "page": null}
[pid: 19|app: 0|req: 3/21] 192.168.4.4 () {70 vars in 1796 bytes} [Thu Oct 6 20:17:42 2022] GET /register => generated 37606 bytes in 177 msecs (HTTP/1.1 200) 8 headers in 600 bytes (1 switches on core 0)
2022-10-06 20:17:42,527 INFO 7 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {"name": "/stepwise/api/v1/configuration/prod", "context": {"user_id": null, "path": "/stepwise/api/v1/configuration/prod", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "a3f4ac2a5bf97f717f5745984059891b", "ip": "192.168.6.26", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", "host": "web.stepwisemath.ai", "referer": "https://web.stepwisemath.ai/register", "accept_language": "en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2022-10-06T20:17:42.527217+00:00", "event_type": "/stepwise/api/v1/configuration/prod", "event_source": "server", "page": null}
[pid: 7|app: 0|req: 3/22] 192.168.4.4 () {68 vars in 1755 bytes} [Thu Oct 6 20:17:42 2022] GET /stepwise/api/v1/configuration/prod => generated 167 bytes in 41 msecs (HTTP/1.1 200) 6 headers in 189 bytes (1 switches on core 0)
2022-10-06 20:17:42,617 INFO 19 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {"name": "/api/user/v2/account/registration/", "context": {"user_id": null, "path": "/api/user/v2/account/registration/", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "a3f4ac2a5bf97f717f5745984059891b", "ip": "192.168.6.26", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", "host": "web.stepwisemath.ai", "referer": "https://web.stepwisemath.ai/register", "accept_language": "en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6", "event": "{\"GET\": {}, \"POST\": {\"next\": [\"/dashboard\"], \"email\": [\"test@stepwisemath.ai\"], \"name\": [\"Test McBugster\"], \"username\": [\"testaccount\"], \"password\": \"********\", \"level_of_education\": [\"\"], \"gender\": [\"\"], \"year_of_birth\": [\"\"], \"mailing_address\": [\"\"], \"goals\": [\"\"], \"social_auth_provider\": [\"Stepwise\"], \"terms_of_service\": [\"true\"]}}", "time": "2022-10-06T20:17:42.616767+00:00", "event_type": "/api/user/v2/account/registration/", "event_source": "server", "page": null}
2022-10-06 20:17:42,620 INFO 7 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {"name": "/api/user/v1/validation/registration", "context": {"user_id": null, "path": "/api/user/v1/validation/registration", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "a3f4ac2a5bf97f717f5745984059891b", "ip": "192.168.6.26", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", "host": "web.stepwisemath.ai", "referer": "https://web.stepwisemath.ai/register", "accept_language": "en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6", "event": "{\"GET\": {}, \"POST\": {\"name\": [\"Test McBugster\"], \"username\": [\"testaccount\"], \"password\": \"********\", \"email\": [\"test@stepwisemath.ai\"], \"terms_of_service\": [\"false\"]}}", "time": "2022-10-06T20:17:42.619453+00:00", "event_type": "/api/user/v1/validation/registration", "event_source": "server", "page": null}
[pid: 7|app: 0|req: 4/23] 192.168.4.4 () {74 vars in 1928 bytes} [Thu Oct 6 20:17:42 2022] POST /api/user/v1/validation/registration => generated 205 bytes in 85 msecs (HTTP/1.1 200) 8 headers in 282 bytes (1 switches on core 0)
2022-10-06 20:17:42,719 INFO 7 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {"name": "/api/user/v1/validation/registration", "context": {"user_id": null, "path": "/api/user/v1/validation/registration", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "a3f4ac2a5bf97f717f5745984059891b", "ip": "192.168.6.26", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", "host": "web.stepwisemath.ai", "referer": "https://web.stepwisemath.ai/register", "accept_language": "en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6", "event": "{\"GET\": {}, \"POST\": {\"name\": [\"Test McBugster\"], \"username\": [\"testaccount\"], \"password\": \"********\", \"email\": [\"test@stepwisemath.ai\"], \"terms_of_service\": [\"false\"]}}", "time": "2022-10-06T20:17:42.719504+00:00", "event_type": "/api/user/v1/validation/registration", "event_source": "server", "page": null}
[pid: 7|app: 0|req: 5/24] 192.168.4.4 () {74 vars in 1928 bytes} [Thu Oct 6 20:17:42 2022] POST /api/user/v1/validation/registration => generated 205 bytes in 102 msecs (HTTP/1.1 200) 8 headers in 282 bytes (1 switches on core 0)
2022-10-06 20:17:42,816 INFO 7 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {"name": "/api/user/v1/validation/registration", "context": {"user_id": null, "path": "/api/user/v1/validation/registration", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "a3f4ac2a5bf97f717f5745984059891b", "ip": "192.168.6.26", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", "host": "web.stepwisemath.ai", "referer": "https://web.stepwisemath.ai/register", "accept_language": "en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6", "event": "{\"GET\": {}, \"POST\": {\"name\": [\"Test McBugster\"], \"username\": [\"testaccount\"], \"password\": \"********\", \"email\": [\"test@stepwisemath.ai\"], \"terms_of_service\": [\"false\"]}}", "time": "2022-10-06T20:17:42.816042+00:00", "event_type": "/api/user/v1/validation/registration", "event_source": "server", "page": null}
[pid: 7|app: 0|req: 6/25] 192.168.4.4 () {74 vars in 1928 bytes} [Thu Oct 6 20:17:42 2022] POST /api/user/v1/validation/registration => generated 205 bytes in 77 msecs (HTTP/1.1 200) 8 headers in 282 bytes (1 switches on core 0)
2022-10-06 20:17:43,160 INFO 19 [audit] [user 53] [ip 192.168.6.26] models.py:2753 - Login success - user.id: 53
2022-10-06 20:17:43,221 INFO 19 [tracking] [user 53] [ip 192.168.6.26] logger.py:41 - {"name": "edx.user.settings.changed", "context": {"user_id": null, "path": "/api/user/v2/account/registration/", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "a3f4ac2a5bf97f717f5745984059891b", "ip": "192.168.6.26", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", "host": "web.stepwisemath.ai", "referer": "https://web.stepwisemath.ai/register", "accept_language": "en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6", "event": {"old": null, "new": "en", "truncated": [], "setting": "pref-lang", "user_id": 53, "table": "user_api_userpreference"}, "time": "2022-10-06T20:17:43.220899+00:00", "event_type": "edx.user.settings.changed", "event_source": "server", "page": null}
2022-10-06 20:17:43,239 INFO 19 [tracking] [user 53] [ip 192.168.6.26] logger.py:41 - {"name": "edx.user.settings.changed", "context": {"user_id": null, "path": "/api/user/v2/account/registration/", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "a3f4ac2a5bf97f717f5745984059891b", "ip": "192.168.6.26", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", "host": "web.stepwisemath.ai", "referer": "https://web.stepwisemath.ai/register", "accept_language": "en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6", "event": {"old": false, "new": true, "truncated": [], "setting": "is_active", "user_id": 53, "table": "auth_user"}, "time": "2022-10-06T20:17:43.238965+00:00", "event_type": "edx.user.settings.changed", "event_source": "server", "page": null}
/openedx/venv/lib/python3.8/site-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Registration.activation_timestamp received a naive datetime (2022-10-06 20:17:43.246811) while time zone support is active.
warnings.warn("DateTimeField %s received a naive datetime (%s)"
2022-10-06 20:17:43,254 INFO 19 [common.djangoapps.student.models] [user 53] [ip 192.168.6.26] models.py:938 - User testaccount (test@stepwisemath.ai) account is successfully activated.
2022-10-06 20:17:43,255 INFO 19 [openedx_events.tooling] [user 53] [ip 192.168.6.26] tooling.py:160 - Responses of the Open edX Event <org.openedx.learning.student.registration.completed.v1>:
[]
2022-10-06 20:17:43,261 INFO 19 [audit] [user 53] [ip 192.168.6.26] register.py:295 - Login success on new account creation - testaccount
[pid: 19|app: 0|req: 4/26] 192.168.4.4 () {74 vars in 1881 bytes} [Thu Oct 6 20:17:42 2022] POST /api/user/v2/account/registration/ => generated 79 bytes in 1145 msecs (HTTP/1.1 200) 15 headers in 3254 bytes (1 switches on core 0)
2022-10-06 20:17:44,014 INFO 7 [tracking] [user 53] [ip 192.168.6.26] logger.py:41 - {"name": "/auth/complete/stepwisemath-oauth/", "context": {"user_id": 53, "path": "/auth/complete/stepwisemath-oauth/", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "testaccount", "session": "4b87c052d7ba72c52f84c82737834d90", "ip": "192.168.6.26", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", "host": "web.stepwisemath.ai", "referer": "https://web.stepwisemath.ai/register", "accept_language": "en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2022-10-06T20:17:44.014681+00:00", "event_type": "/auth/complete/stepwisemath-oauth/", "event_source": "server", "page": null}
/openedx/venv/lib/python3.8/site-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField User.date_joined received a naive datetime (2022-10-06 19:57:56) while time zone support is active.
warnings.warn("DateTimeField %s received a naive datetime (%s)"
2022-10-06 20:17:44,100 INFO 7 [tracking] [user 53] [ip 192.168.6.26] logger.py:41 - {"name": "edx.user.settings.changed", "context": {"user_id": 53, "path": "/auth/complete/stepwisemath-oauth/", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "testaccount", "session": "4b87c052d7ba72c52f84c82737834d90", "ip": "192.168.6.26", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", "host": "web.stepwisemath.ai", "referer": "https://web.stepwisemath.ai/register", "accept_language": "en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6", "event": {"old": "2022-10-06T20:17:42.674048+00:00", "new": "2022-10-06 19:57:56", "truncated": [], "setting": "date_joined", "user_id": 53, "table": "auth_user"}, "time": "2022-10-06T20:17:44.100229+00:00", "event_type": "edx.user.settings.changed", "event_source": "server", "page": null}
[pid: 7|app: 0|req: 7/27] 192.168.4.4 () {66 vars in 3727 bytes} [Thu Oct 6 20:17:43 2022] GET /auth/complete/stepwisemath-oauth/? => generated 0 bytes in 150 msecs (HTTP/1.1 302) 10 headers in 721 bytes (1 switches on core 0)
2022-10-06 20:17:44,375 INFO 19 [tracking] [user 53] [ip 192.168.6.26] logger.py:41 - {"name": "/dashboard", "context": {"user_id": 53, "path": "/dashboard", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "testaccount", "session": "4b87c052d7ba72c52f84c82737834d90", "ip": "192.168.6.26", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", "host": "web.stepwisemath.ai", "referer": "https://web.stepwisemath.ai/register", "accept_language": "en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2022-10-06T20:17:44.374973+00:00", "event_type": "/dashboard", "event_source": "server", "page": null}
Raw data
{
"_id": null,
"home_page": "https://github.com/StepwiseMath/edx-oauth2-wordpress-backend",
"name": "edx-oauth2-wordpress-backend",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "Open edX,oauth,Wordpress",
"author": "Lawrence McDaniel, lpm0073@gmail.com",
"author_email": "Lawrence McDaniel <lpm0073@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/70/45/b7e83cdb9b6c053d12cfe19720627621bba4318092033aeaa58fb78f3321/edx-oauth2-wordpress-backend-1.0.8.tar.gz",
"platform": null,
"description": "Open edX OAuth2 Backend for Wordpress\n=====================================\n.. image:: https://img.shields.io/static/v1?label=pypi&style=flat-square&color=0475b6&message=edx-oauth2-wordpress-backend\n :alt: PyPi edx-oauth2-wordpress-backend\n :target: https://pypi.org/project/edx-oauth2-wordpress-backend/\n\n.. image:: https://img.shields.io/badge/hack.d-Lawrence%20McDaniel-orange.svg\n :target: https://lawrencemcdaniel.com\n :alt: Hack.d Lawrence McDaniel\n\n.. image:: https://img.shields.io/static/v1?logo=discourse&label=Discussions&style=flat-square&color=ff0080&message=OpenEdx\n :alt: Open edX Discussions\n :target: https://discuss.openedx.org/\n\n.. image:: https://img.shields.io/static/v1?label=WP-Oauth&style=flat-square&color=1054ff&message=Server\n :alt: WP Oauth\n :target: https://wp-oauth.com/\n\n|\n\n\nOverview\n--------\n\nAn Open edX oauth2 backend for `Wordpress <https://wordpress.org//>`_ `WP OAuth Server <https://wp-oauth.com/>`_.\n\n- `Python Social Auth custom backend implentation <https://python-social-auth.readthedocs.io/en/latest/backends/implementation.html>`_\n- `WP Oauth Wordpress Plugin Documentation <https://wp-oauth.com/docs/>`_\n\nThis is a strongly-typed implementation that leverages an in-depth knowledge of the WP Oauth return objects\nto generate verbose, informative log data in `lms.log <./doc/lms.log>`_ that will help you to quickly get third party authentication\nworking on your Open edX installation.\n\n\nUsage\n-----\n\nAn example implementation for an Open edX installation named https://stepwisemath.ai/\n\n1. add this package to your project's requiremets\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nadd this package to your project's requiremets.txt, or install it from the command line.\n\n.. code-block:: shell\n\n pip install edx-oauth2-wordpress-backend\n\n2. subclass WPOpenEdxOAuth2\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSubclass oauth2_wordpress.wp_oauth.WPOpenEdxOAuth2, and configure for your Wordpress oauth provider.\n\n.. code-block:: python\n\n from oauth2_wordpress.wp_oauth import WPOpenEdxOAuth2\n\n\n class StepwiseMathWPOAuth2(WPOpenEdxOAuth2):\n\n # This defines the backend name and identifies it during the auth process.\n # The name is used in the URLs /login/<backend name> and /complete/<backend name>.\n #\n # This is the string value that will appear in the LMS Django Admin\n # Third Party Authentication / Provider Configuration (OAuth)\n # setup page drop-down box titled, \"Backend name:\", just above\n # the \"Client ID:\" and \"Client Secret:\" fields.\n name = \"stepwisemath-oauth\"\n\n # note: no slash at the end of the base url. Python Social Auth\n # might clean this up for you, but i'm not 100% certain of that.\n #\n # the following will create an authorization url of https://stepwisemath.ai/wp-json/moserver/authorize\n BASE_URL = \"https://stepwisemath.ai\"\n PATH = \"wp-json/moserver/\"\n AUTHORIZATION_ENDPOINT = \"authorize\"\n TOKEN_ENDPOINT = \"token\"\n USERINFO_ENDPOINT = \"resource\"\n\n\n3. configure your Open edX lms application\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code-block:: yaml\n\n ADDL_INSTALLED_APPS:\n - \"oauth2_wordpress\"\n THIRD_PARTY_AUTH_BACKENDS:\n - \"oauth2_wordpress.wp_oauth.StepwiseMathWPOAuth2\"\n ENABLE_REQUIRE_THIRD_PARTY_AUTH: true\n\nadd these settings to django.conf:\n\n.. list-table:: WP Oauth setup\n :widths: 50 100\n :header-rows: 1\n\n * - Key\n - Value\n * - WPOAUTH_BACKEND_BASE_URL\n - https://stepwisemath.ai\n * - WPOAUTH_BACKEND_CLIENT_ID\n - see: https://stepwisemath.ai/wp-admin/admin.php?page=mo_oauth_server_settings\n * - WPOAUTH_BACKEND_CLIENT_SECRET\n - see: https://stepwisemath.ai/wp-admin/admin.php?page=mo_oauth_server_settings\n * - SCOPE\n - basic email profile\n * - GRANT_TYPE\n - Authorization Code\n * - REDIRECT_URI\n - https://web.stepwisemath.ai/auth/complete/stepwisemath-oauth\n\n4. Configure a new Oauth2 client from the lms Django Admin console\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. image:: https://raw.githubusercontent.com/lpm0073/edx-oauth2-wordpress-backend/main/doc/django-admin-1.png\n :width: 100%\n :alt: Open edX Django Admin Add Provider Configuration (OAuth)\n\n.. image:: https://raw.githubusercontent.com/lpm0073/edx-oauth2-wordpress-backend/main/doc/django-admin-2.png\n :width: 100%\n :alt: Open edX Django Admin Add Provider Configuration (OAuth)\n\n\nCookiecutter openedx_devops deployment\n\n.. code-block:: shell\n\n tutor config save --set OPENEDX_WPOAUTH_BACKEND_BASE_URL=\"${{ secrets.WPOAUTH_BACKEND_BASE_URL }}\" \\\n --set OPENEDX_WPOAUTH_BACKEND_CLIENT_ID=\"${{ secrets.WPOAUTH_BACKEND_CLIENT_ID }}\" \\\n --set OPENEDX_WPOAUTH_BACKEND_CLIENT_SECRET=\"${{ secrets.WPOAUTH_BACKEND_CLIENT_SECRET }}\"\n\nWP Oauth Plugin Configuration\n-----------------------------\n\nThis plugin enables your Open edX installation to authenticate against the WP Oauth plugin provider\nin your Wordpress web site, configured as follows:\n\n.. image:: https://raw.githubusercontent.com/lpm0073/edx-oauth2-wordpress-backend/main/doc/wp-oauth-config.png\n :width: 100%\n :alt: WP OAuth Server configuration page\n\nSample lms log output\n---------------------\n\n\n.. code-block:: shell\n\n 2022-10-06 20:17:08,832 INFO 19 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {\"name\": \"/auth/login/stepwisemath-oauth/\", \"context\": {\"user_id\": null, \"path\": \"/auth/login/stepwisemath-oauth/\", \"course_id\": \"\", \"org_id\": \"\", \"enterprise_uuid\": \"\"}, \"username\": \"\", \"session\": \"a3f4ac2a5bf97f717f5745984059891b\", \"ip\": \"192.168.6.26\", \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\", \"host\": \"web.stepwisemath.ai\", \"referer\": \"https://web.stepwisemath.ai/login\", \"accept_language\": \"en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6\", \"event\": \"{\\\"GET\\\": {\\\"auth_entry\\\": [\\\"login\\\"], \\\"next\\\": [\\\"/dashboard\\\"]}, \\\"POST\\\": {}}\", \"time\": \"2022-10-06T20:17:08.832684+00:00\", \"event_type\": \"/auth/login/stepwisemath-oauth/\", \"event_source\": \"server\", \"page\": null}\n 2022-10-06 20:17:09,230 INFO 19 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:216 - AUTHORIZATION_URL: https://stepwisemath.ai/oauth/authorize\n [pid: 19|app: 0|req: 2/19] 192.168.4.4 () {68 vars in 1889 bytes} [Thu Oct 6 20:17:08 2022] GET /auth/login/stepwisemath-oauth/?auth_entry=login&next=%2Fdashboard => generated 0 bytes in 430 msecs (HTTP/1.1 302) 9 headers in 922 bytes (1 switches on core 0)\n 2022-10-06 20:17:38,485 INFO 7 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {\"name\": \"/auth/complete/stepwisemath-oauth/\", \"context\": {\"user_id\": null, \"path\": \"/auth/complete/stepwisemath-oauth/\", \"course_id\": \"\", \"org_id\": \"\", \"enterprise_uuid\": \"\"}, \"username\": \"\", \"session\": \"a3f4ac2a5bf97f717f5745984059891b\", \"ip\": \"192.168.6.26\", \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\", \"host\": \"web.stepwisemath.ai\", \"referer\": \"https://stepwisemath.ai/\", \"accept_language\": \"en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6\", \"event\": \"{\\\"GET\\\": {\\\"redirect_state\\\": [\\\"pdbIKIcEbhjVr3Kon5VXUWWiy5kuX921\\\"], \\\"code\\\": [\\\"q0antmap4qfamd6pe24jh75pdprahpdiyitmut0o\\\"], \\\"state\\\": [\\\"pdbIKIcEbhjVr3Kon5VXUWWiy5kuX921\\\"], \\\"iframe\\\": [\\\"break\\\"]}, \\\"POST\\\": {}}\", \"time\": \"2022-10-06T20:17:38.484675+00:00\", \"event_type\": \"/auth/complete/stepwisemath-oauth/\", \"event_source\": \"server\", \"page\": null}\n 2022-10-06 20:17:38,496 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:223 - ACCESS_TOKEN_URL: https://stepwisemath.ai/oauth/token\n 2022-10-06 20:17:40,197 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:230 - USER_QUERY: https://stepwisemath.ai/oauth/me\n 2022-10-06 20:17:40,197 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:363 - user_data() url: https://stepwisemath.ai/oauth/me?access_token=jx2zql9fw2jx9s7tayik4ybfjrmuhb7m5csb1mtl\n 2022-10-06 20:17:41,965 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:368 - user_data() response: {\n \"ID\": \"7\",\n \"display_name\": \"Test McBugster\",\n \"user_email\": \"test@stepwisemath.ai\",\n \"user_login\": \"testaccount\",\n \"user_nicename\": \"testaccount\",\n \"user_registered\": \"2022-10-06 19:57:56\",\n \"user_roles\": [\n \"administrator\"\n ],\n \"user_status\": \"0\"\n }\n 2022-10-06 20:17:41,966 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:269 - get_user_details() received wp-oauth user data response json dict: {\n \"ID\": \"7\",\n \"display_name\": \"Test McBugster\",\n \"user_email\": \"test@stepwisemath.ai\",\n \"user_login\": \"testaccount\",\n \"user_nicename\": \"testaccount\",\n \"user_registered\": \"2022-10-06 19:57:56\",\n \"user_roles\": [\n \"administrator\"\n ],\n \"user_status\": \"0\"\n }\n 2022-10-06 20:17:41,966 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:317 - get_user_details() processing response object\n 2022-10-06 20:17:41,966 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:241 - user_details.setter: new value set {\n \"date_joined\": \"2022-10-06 19:57:56\",\n \"email\": \"test@stepwisemath.ai\",\n \"first_name\": \"Test\",\n \"fullname\": \"Test McBugster\",\n \"id\": 7,\n \"is_staff\": true,\n \"is_superuser\": true,\n \"last_name\": \"McBugster\",\n \"refresh_token\": \"\",\n \"scope\": \"\",\n \"token_type\": \"\",\n \"user_status\": \"0\",\n \"username\": \"testaccount\"\n }\n 2022-10-06 20:17:41,967 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:345 - get_user_details() returning: {\n \"date_joined\": \"2022-10-06 19:57:56\",\n \"email\": \"test@stepwisemath.ai\",\n \"first_name\": \"Test\",\n \"fullname\": \"Test McBugster\",\n \"id\": 7,\n \"is_staff\": true,\n \"is_superuser\": true,\n \"last_name\": \"McBugster\",\n \"refresh_token\": \"\",\n \"scope\": \"\",\n \"token_type\": \"\",\n \"user_status\": \"0\",\n \"username\": \"testaccount\"\n }\n 2022-10-06 20:17:41,972 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:269 - get_user_details() received extended get_user_details() return dict: {\n \"access_token\": \"jx2zql9fw2jx9s7tayik4ybfjrmuhb7m5csb1mtl\",\n \"date_joined\": \"2022-10-06 19:57:56\",\n \"email\": \"test@stepwisemath.ai\",\n \"expires_in\": 3600,\n \"first_name\": \"Test\",\n \"fullname\": \"Test McBugster\",\n \"id\": 7,\n \"is_staff\": true,\n \"is_superuser\": true,\n \"last_name\": \"McBugster\",\n \"refresh_token\": \"\",\n \"scope\": \"\",\n \"token_type\": \"\",\n \"user_status\": \"0\",\n \"username\": \"testaccount\"\n }\n 2022-10-06 20:17:41,973 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:241 - user_details.setter: new value set {\n \"access_token\": \"jx2zql9fw2jx9s7tayik4ybfjrmuhb7m5csb1mtl\",\n \"date_joined\": \"2022-10-06 19:57:56\",\n \"email\": \"test@stepwisemath.ai\",\n \"expires_in\": 3600,\n \"first_name\": \"Test\",\n \"fullname\": \"Test McBugster\",\n \"id\": 7,\n \"is_staff\": true,\n \"is_superuser\": true,\n \"last_name\": \"McBugster\",\n \"refresh_token\": \"\",\n \"scope\": \"\",\n \"token_type\": \"\",\n \"user_status\": \"0\",\n \"username\": \"testaccount\"\n }\n 2022-10-06 20:17:41,973 INFO 7 [oauth2_wordpress.wp_oauth] [user None] [ip 192.168.6.26] wp_oauth.py:290 - get_user_details() returning extended get_user_details() return dict: {\n \"access_token\": \"jx2zql9fw2jx9s7tayik4ybfjrmuhb7m5csb1mtl\",\n \"date_joined\": \"2022-10-06 19:57:56\",\n \"email\": \"test@stepwisemath.ai\",\n \"expires_in\": 3600,\n \"first_name\": \"Test\",\n \"fullname\": \"Test McBugster\",\n \"id\": 7,\n \"is_staff\": true,\n \"is_superuser\": true,\n \"last_name\": \"McBugster\",\n \"refresh_token\": \"\",\n \"scope\": \"\",\n \"token_type\": \"\",\n \"user_status\": \"0\",\n \"username\": \"testaccount\"\n }\n [pid: 7|app: 0|req: 2/20] 192.168.4.4 () {70 vars in 2136 bytes} [Thu Oct 6 20:17:38 2022] GET /auth/complete/stepwisemath-oauth/?redirect_state=pdbIKIcEbhjVr3Kon5VXUWWiy5kuX921&code=q0antmap4qfamd6pe24jh75pdprahpdiyitmut0o&state=pdbIKIcEbhjVr3Kon5VXUWWiy5kuX921&iframe=break => generated 0 bytes in 3549 msecs (HTTP/1.1 302) 9 headers in 612 bytes (1 switches on core 0)\n 2022-10-06 20:17:42,211 INFO 19 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {\"name\": \"/register\", \"context\": {\"user_id\": null, \"path\": \"/register\", \"course_id\": \"\", \"org_id\": \"\", \"enterprise_uuid\": \"\"}, \"username\": \"\", \"session\": \"a3f4ac2a5bf97f717f5745984059891b\", \"ip\": \"192.168.6.26\", \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\", \"host\": \"web.stepwisemath.ai\", \"referer\": \"https://stepwisemath.ai/\", \"accept_language\": \"en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6\", \"event\": \"{\\\"GET\\\": {}, \\\"POST\\\": {}}\", \"time\": \"2022-10-06T20:17:42.211436+00:00\", \"event_type\": \"/register\", \"event_source\": \"server\", \"page\": null}\n [pid: 19|app: 0|req: 3/21] 192.168.4.4 () {70 vars in 1796 bytes} [Thu Oct 6 20:17:42 2022] GET /register => generated 37606 bytes in 177 msecs (HTTP/1.1 200) 8 headers in 600 bytes (1 switches on core 0)\n 2022-10-06 20:17:42,527 INFO 7 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {\"name\": \"/stepwise/api/v1/configuration/prod\", \"context\": {\"user_id\": null, \"path\": \"/stepwise/api/v1/configuration/prod\", \"course_id\": \"\", \"org_id\": \"\", \"enterprise_uuid\": \"\"}, \"username\": \"\", \"session\": \"a3f4ac2a5bf97f717f5745984059891b\", \"ip\": \"192.168.6.26\", \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\", \"host\": \"web.stepwisemath.ai\", \"referer\": \"https://web.stepwisemath.ai/register\", \"accept_language\": \"en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6\", \"event\": \"{\\\"GET\\\": {}, \\\"POST\\\": {}}\", \"time\": \"2022-10-06T20:17:42.527217+00:00\", \"event_type\": \"/stepwise/api/v1/configuration/prod\", \"event_source\": \"server\", \"page\": null}\n [pid: 7|app: 0|req: 3/22] 192.168.4.4 () {68 vars in 1755 bytes} [Thu Oct 6 20:17:42 2022] GET /stepwise/api/v1/configuration/prod => generated 167 bytes in 41 msecs (HTTP/1.1 200) 6 headers in 189 bytes (1 switches on core 0)\n 2022-10-06 20:17:42,617 INFO 19 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {\"name\": \"/api/user/v2/account/registration/\", \"context\": {\"user_id\": null, \"path\": \"/api/user/v2/account/registration/\", \"course_id\": \"\", \"org_id\": \"\", \"enterprise_uuid\": \"\"}, \"username\": \"\", \"session\": \"a3f4ac2a5bf97f717f5745984059891b\", \"ip\": \"192.168.6.26\", \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\", \"host\": \"web.stepwisemath.ai\", \"referer\": \"https://web.stepwisemath.ai/register\", \"accept_language\": \"en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6\", \"event\": \"{\\\"GET\\\": {}, \\\"POST\\\": {\\\"next\\\": [\\\"/dashboard\\\"], \\\"email\\\": [\\\"test@stepwisemath.ai\\\"], \\\"name\\\": [\\\"Test McBugster\\\"], \\\"username\\\": [\\\"testaccount\\\"], \\\"password\\\": \\\"********\\\", \\\"level_of_education\\\": [\\\"\\\"], \\\"gender\\\": [\\\"\\\"], \\\"year_of_birth\\\": [\\\"\\\"], \\\"mailing_address\\\": [\\\"\\\"], \\\"goals\\\": [\\\"\\\"], \\\"social_auth_provider\\\": [\\\"Stepwise\\\"], \\\"terms_of_service\\\": [\\\"true\\\"]}}\", \"time\": \"2022-10-06T20:17:42.616767+00:00\", \"event_type\": \"/api/user/v2/account/registration/\", \"event_source\": \"server\", \"page\": null}\n 2022-10-06 20:17:42,620 INFO 7 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {\"name\": \"/api/user/v1/validation/registration\", \"context\": {\"user_id\": null, \"path\": \"/api/user/v1/validation/registration\", \"course_id\": \"\", \"org_id\": \"\", \"enterprise_uuid\": \"\"}, \"username\": \"\", \"session\": \"a3f4ac2a5bf97f717f5745984059891b\", \"ip\": \"192.168.6.26\", \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\", \"host\": \"web.stepwisemath.ai\", \"referer\": \"https://web.stepwisemath.ai/register\", \"accept_language\": \"en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6\", \"event\": \"{\\\"GET\\\": {}, \\\"POST\\\": {\\\"name\\\": [\\\"Test McBugster\\\"], \\\"username\\\": [\\\"testaccount\\\"], \\\"password\\\": \\\"********\\\", \\\"email\\\": [\\\"test@stepwisemath.ai\\\"], \\\"terms_of_service\\\": [\\\"false\\\"]}}\", \"time\": \"2022-10-06T20:17:42.619453+00:00\", \"event_type\": \"/api/user/v1/validation/registration\", \"event_source\": \"server\", \"page\": null}\n [pid: 7|app: 0|req: 4/23] 192.168.4.4 () {74 vars in 1928 bytes} [Thu Oct 6 20:17:42 2022] POST /api/user/v1/validation/registration => generated 205 bytes in 85 msecs (HTTP/1.1 200) 8 headers in 282 bytes (1 switches on core 0)\n 2022-10-06 20:17:42,719 INFO 7 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {\"name\": \"/api/user/v1/validation/registration\", \"context\": {\"user_id\": null, \"path\": \"/api/user/v1/validation/registration\", \"course_id\": \"\", \"org_id\": \"\", \"enterprise_uuid\": \"\"}, \"username\": \"\", \"session\": \"a3f4ac2a5bf97f717f5745984059891b\", \"ip\": \"192.168.6.26\", \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\", \"host\": \"web.stepwisemath.ai\", \"referer\": \"https://web.stepwisemath.ai/register\", \"accept_language\": \"en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6\", \"event\": \"{\\\"GET\\\": {}, \\\"POST\\\": {\\\"name\\\": [\\\"Test McBugster\\\"], \\\"username\\\": [\\\"testaccount\\\"], \\\"password\\\": \\\"********\\\", \\\"email\\\": [\\\"test@stepwisemath.ai\\\"], \\\"terms_of_service\\\": [\\\"false\\\"]}}\", \"time\": \"2022-10-06T20:17:42.719504+00:00\", \"event_type\": \"/api/user/v1/validation/registration\", \"event_source\": \"server\", \"page\": null}\n [pid: 7|app: 0|req: 5/24] 192.168.4.4 () {74 vars in 1928 bytes} [Thu Oct 6 20:17:42 2022] POST /api/user/v1/validation/registration => generated 205 bytes in 102 msecs (HTTP/1.1 200) 8 headers in 282 bytes (1 switches on core 0)\n 2022-10-06 20:17:42,816 INFO 7 [tracking] [user None] [ip 192.168.6.26] logger.py:41 - {\"name\": \"/api/user/v1/validation/registration\", \"context\": {\"user_id\": null, \"path\": \"/api/user/v1/validation/registration\", \"course_id\": \"\", \"org_id\": \"\", \"enterprise_uuid\": \"\"}, \"username\": \"\", \"session\": \"a3f4ac2a5bf97f717f5745984059891b\", \"ip\": \"192.168.6.26\", \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\", \"host\": \"web.stepwisemath.ai\", \"referer\": \"https://web.stepwisemath.ai/register\", \"accept_language\": \"en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6\", \"event\": \"{\\\"GET\\\": {}, \\\"POST\\\": {\\\"name\\\": [\\\"Test McBugster\\\"], \\\"username\\\": [\\\"testaccount\\\"], \\\"password\\\": \\\"********\\\", \\\"email\\\": [\\\"test@stepwisemath.ai\\\"], \\\"terms_of_service\\\": [\\\"false\\\"]}}\", \"time\": \"2022-10-06T20:17:42.816042+00:00\", \"event_type\": \"/api/user/v1/validation/registration\", \"event_source\": \"server\", \"page\": null}\n [pid: 7|app: 0|req: 6/25] 192.168.4.4 () {74 vars in 1928 bytes} [Thu Oct 6 20:17:42 2022] POST /api/user/v1/validation/registration => generated 205 bytes in 77 msecs (HTTP/1.1 200) 8 headers in 282 bytes (1 switches on core 0)\n 2022-10-06 20:17:43,160 INFO 19 [audit] [user 53] [ip 192.168.6.26] models.py:2753 - Login success - user.id: 53\n 2022-10-06 20:17:43,221 INFO 19 [tracking] [user 53] [ip 192.168.6.26] logger.py:41 - {\"name\": \"edx.user.settings.changed\", \"context\": {\"user_id\": null, \"path\": \"/api/user/v2/account/registration/\", \"course_id\": \"\", \"org_id\": \"\", \"enterprise_uuid\": \"\"}, \"username\": \"\", \"session\": \"a3f4ac2a5bf97f717f5745984059891b\", \"ip\": \"192.168.6.26\", \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\", \"host\": \"web.stepwisemath.ai\", \"referer\": \"https://web.stepwisemath.ai/register\", \"accept_language\": \"en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6\", \"event\": {\"old\": null, \"new\": \"en\", \"truncated\": [], \"setting\": \"pref-lang\", \"user_id\": 53, \"table\": \"user_api_userpreference\"}, \"time\": \"2022-10-06T20:17:43.220899+00:00\", \"event_type\": \"edx.user.settings.changed\", \"event_source\": \"server\", \"page\": null}\n 2022-10-06 20:17:43,239 INFO 19 [tracking] [user 53] [ip 192.168.6.26] logger.py:41 - {\"name\": \"edx.user.settings.changed\", \"context\": {\"user_id\": null, \"path\": \"/api/user/v2/account/registration/\", \"course_id\": \"\", \"org_id\": \"\", \"enterprise_uuid\": \"\"}, \"username\": \"\", \"session\": \"a3f4ac2a5bf97f717f5745984059891b\", \"ip\": \"192.168.6.26\", \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\", \"host\": \"web.stepwisemath.ai\", \"referer\": \"https://web.stepwisemath.ai/register\", \"accept_language\": \"en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6\", \"event\": {\"old\": false, \"new\": true, \"truncated\": [], \"setting\": \"is_active\", \"user_id\": 53, \"table\": \"auth_user\"}, \"time\": \"2022-10-06T20:17:43.238965+00:00\", \"event_type\": \"edx.user.settings.changed\", \"event_source\": \"server\", \"page\": null}\n /openedx/venv/lib/python3.8/site-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField Registration.activation_timestamp received a naive datetime (2022-10-06 20:17:43.246811) while time zone support is active.\n warnings.warn(\"DateTimeField %s received a naive datetime (%s)\"\n 2022-10-06 20:17:43,254 INFO 19 [common.djangoapps.student.models] [user 53] [ip 192.168.6.26] models.py:938 - User testaccount (test@stepwisemath.ai) account is successfully activated.\n 2022-10-06 20:17:43,255 INFO 19 [openedx_events.tooling] [user 53] [ip 192.168.6.26] tooling.py:160 - Responses of the Open edX Event <org.openedx.learning.student.registration.completed.v1>:\n []\n 2022-10-06 20:17:43,261 INFO 19 [audit] [user 53] [ip 192.168.6.26] register.py:295 - Login success on new account creation - testaccount\n [pid: 19|app: 0|req: 4/26] 192.168.4.4 () {74 vars in 1881 bytes} [Thu Oct 6 20:17:42 2022] POST /api/user/v2/account/registration/ => generated 79 bytes in 1145 msecs (HTTP/1.1 200) 15 headers in 3254 bytes (1 switches on core 0)\n 2022-10-06 20:17:44,014 INFO 7 [tracking] [user 53] [ip 192.168.6.26] logger.py:41 - {\"name\": \"/auth/complete/stepwisemath-oauth/\", \"context\": {\"user_id\": 53, \"path\": \"/auth/complete/stepwisemath-oauth/\", \"course_id\": \"\", \"org_id\": \"\", \"enterprise_uuid\": \"\"}, \"username\": \"testaccount\", \"session\": \"4b87c052d7ba72c52f84c82737834d90\", \"ip\": \"192.168.6.26\", \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\", \"host\": \"web.stepwisemath.ai\", \"referer\": \"https://web.stepwisemath.ai/register\", \"accept_language\": \"en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6\", \"event\": \"{\\\"GET\\\": {}, \\\"POST\\\": {}}\", \"time\": \"2022-10-06T20:17:44.014681+00:00\", \"event_type\": \"/auth/complete/stepwisemath-oauth/\", \"event_source\": \"server\", \"page\": null}\n /openedx/venv/lib/python3.8/site-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField User.date_joined received a naive datetime (2022-10-06 19:57:56) while time zone support is active.\n warnings.warn(\"DateTimeField %s received a naive datetime (%s)\"\n 2022-10-06 20:17:44,100 INFO 7 [tracking] [user 53] [ip 192.168.6.26] logger.py:41 - {\"name\": \"edx.user.settings.changed\", \"context\": {\"user_id\": 53, \"path\": \"/auth/complete/stepwisemath-oauth/\", \"course_id\": \"\", \"org_id\": \"\", \"enterprise_uuid\": \"\"}, \"username\": \"testaccount\", \"session\": \"4b87c052d7ba72c52f84c82737834d90\", \"ip\": \"192.168.6.26\", \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\", \"host\": \"web.stepwisemath.ai\", \"referer\": \"https://web.stepwisemath.ai/register\", \"accept_language\": \"en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6\", \"event\": {\"old\": \"2022-10-06T20:17:42.674048+00:00\", \"new\": \"2022-10-06 19:57:56\", \"truncated\": [], \"setting\": \"date_joined\", \"user_id\": 53, \"table\": \"auth_user\"}, \"time\": \"2022-10-06T20:17:44.100229+00:00\", \"event_type\": \"edx.user.settings.changed\", \"event_source\": \"server\", \"page\": null}\n [pid: 7|app: 0|req: 7/27] 192.168.4.4 () {66 vars in 3727 bytes} [Thu Oct 6 20:17:43 2022] GET /auth/complete/stepwisemath-oauth/? => generated 0 bytes in 150 msecs (HTTP/1.1 302) 10 headers in 721 bytes (1 switches on core 0)\n 2022-10-06 20:17:44,375 INFO 19 [tracking] [user 53] [ip 192.168.6.26] logger.py:41 - {\"name\": \"/dashboard\", \"context\": {\"user_id\": 53, \"path\": \"/dashboard\", \"course_id\": \"\", \"org_id\": \"\", \"enterprise_uuid\": \"\"}, \"username\": \"testaccount\", \"session\": \"4b87c052d7ba72c52f84c82737834d90\", \"ip\": \"192.168.6.26\", \"agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\", \"host\": \"web.stepwisemath.ai\", \"referer\": \"https://web.stepwisemath.ai/register\", \"accept_language\": \"en-US,en;q=0.9,es-MX;q=0.8,es-US;q=0.7,es;q=0.6\", \"event\": \"{\\\"GET\\\": {}, \\\"POST\\\": {}}\", \"time\": \"2022-10-06T20:17:44.374973+00:00\", \"event_type\": \"/dashboard\", \"event_source\": \"server\", \"page\": null}\n",
"bugtrack_url": null,
"license": "",
"summary": "An Open edX Python Social Auth backend for Wordpress",
"version": "1.0.8",
"project_urls": {
"Bug Tracker": "https://github.com/lpm0073/edx-oauth2-wordpress-backend/issues",
"Homepage": "https://github.com/lpm0073/edx-oauth2-wordpress-backend"
},
"split_keywords": [
"open edx",
"oauth",
"wordpress"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3e9879bbe6ed511d2a8fea7011a9b6a015810afe4a7b6660a6bdd2886af1f903",
"md5": "8bff5c1ad385212365e1e04ca45445a5",
"sha256": "7964be4b42b2d88a6c370d2c271ec002bea65cf71c62725be1193ccdc4cf5223"
},
"downloads": -1,
"filename": "edx_oauth2_wordpress_backend-1.0.8-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "8bff5c1ad385212365e1e04ca45445a5",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.7",
"size": 12302,
"upload_time": "2024-02-01T18:36:54",
"upload_time_iso_8601": "2024-02-01T18:36:54.379856Z",
"url": "https://files.pythonhosted.org/packages/3e/98/79bbe6ed511d2a8fea7011a9b6a015810afe4a7b6660a6bdd2886af1f903/edx_oauth2_wordpress_backend-1.0.8-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7045b7e83cdb9b6c053d12cfe19720627621bba4318092033aeaa58fb78f3321",
"md5": "d7d432770e0b7f5fecfe93b1038305ac",
"sha256": "683c60bfa250dfffe6b2a551a76e4fb0b30fdfcd6eb55256bde749f261a78f26"
},
"downloads": -1,
"filename": "edx-oauth2-wordpress-backend-1.0.8.tar.gz",
"has_sig": false,
"md5_digest": "d7d432770e0b7f5fecfe93b1038305ac",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 13929,
"upload_time": "2024-02-01T18:36:55",
"upload_time_iso_8601": "2024-02-01T18:36:55.993310Z",
"url": "https://files.pythonhosted.org/packages/70/45/b7e83cdb9b6c053d12cfe19720627621bba4318092033aeaa58fb78f3321/edx-oauth2-wordpress-backend-1.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-01 18:36:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "StepwiseMath",
"github_project": "edx-oauth2-wordpress-backend",
"github_not_found": true,
"lcname": "edx-oauth2-wordpress-backend"
}