* fixes #1260 - playwright tests fixes #1394 - v2 search failing to find some names fixes #1374 - Search to include new objects: Campus & Carrier fixes #1164 - better rdap error reporting fixes #1368 - Facility data export into Google Earth KMZ fixes #1328 - Support web updates from a source of truth fixes #1257 - Help text covers non-compliant email addresses fixes #1313 - Improve email confirmation control - add 3 month option & maybe set new default value fixes #1380 - Reset 'Social Media' to '[]' if field has no value * linting * remove target=_blank * bump ES version to 8.10 * Cache and ES updates (#1459) * elasticsearch major version pin and relock * set decimal fields to python value on client save for load_data * force use of redis password * add default_meta to render * add generated, clean up var names * run pre-commit * update ES for https and password * rm cruft * isort --------- Co-authored-by: 20C <code@20c.com> Co-authored-by: Matt Griswold <grizz@20c.com>
2.2 KiB
Generated from oauth_views.py on 2023-08-15 16:04:08.595120
peeringdb_server.oauth_views
Classes
AuthorizationView
AuthorizationView(peeringdb_server.oauth_views.BaseAuthorizationView, django.views.generic.edit.FormView)
Implements an endpoint to handle Authorization Requests as in :rfc:4.1.1 and prompting the
user with a form to determine if she authorizes the client application to access her data.
This endpoint is reached two times during the authorization process:
-
first receive a
GETrequest from user asking authorization for a certain client application, a form is served possibly showing some useful info and prompting for authorize/do not authorize. -
then receive a
POSTrequest possibly after user authorized the access
Some informations contained in the GET request and needed to create a Grant token during
the POST request would be lost between the two steps above, so they are temporarily stored in
hidden fields on the form.
A possible alternative could be keeping such informations in the session.
The endpoint is used in the following flows:
- Authorization code
- Implicit grant
Methods
form_valid
def form_valid(self, form)
If the form is valid, redirect to the supplied URL.
get
def get(self, request, *args, **kwargs)
Handle GET requests: instantiate a blank version of the form.
get_initial
def get_initial(self)
Return the initial data to use for forms on this view.
BaseAuthorizationView
BaseAuthorizationView(peeringdb_server.oauth_views.LoginRequiredMixin, oauth2_provider.views.mixins.OAuthLibMixin, django.views.generic.base.View)
Implements a generic endpoint to handle Authorization Requests as in :rfc:4.1.1. The view
does not implement any strategy to determine authorize/do not authorize logic.
The endpoint is used in the following flows:
- Authorization code
- Implicit grant
Methods
error_response
def error_response(self, error, application, **kwargs)
Handle errors either by redirecting to redirect_uri with a json in the body containing error details or providing an error response
LoginRequiredMixin
LoginRequiredMixin(django.contrib.auth.mixins.AccessMixin)
Verify that the current user is authenticated.