Views
ThirdPartyAuthForm(*args, label_suffix='', initial, **kwargs)
¶
Bases: Form
Form to complete to authenticate on the sith from a third-party app.
For the form to be valid, the user approve the EULA (french: CGU) and give its username from the third-party app.
Source code in api/forms.py
ApiClient
¶
Bases: Model
has_perm(perm)
¶
has_perms(perm_list)
¶
Return True if the client has each of the specified permissions.
Source code in api/models.py
reset_hmac(*, commit=True)
¶
Reset and return the HMAC key for this client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
commit
|
bool
|
if True (the default), persist the new hmac in db. |
True
|
Source code in api/models.py
ThirdPartyAuthParamsSchema
¶
Bases: Schema
ThirdPartyAuthView
¶
Bases: AccessMixin, FormView
parse_params()
¶
Parse and check the authentication parameters.
If parsing fails, messages will be created using the django message infrastructure.
Returns:
| Type | Description |
|---|---|
ThirdPartyAuthParamsSchema | None
|
The parses parameters, or None if the parsing failed. |
Source code in api/views.py
ThirdPartyAuthResultView
¶
Bases: LoginRequiredMixin, TemplateView
View that the user will see if its authentication on sith was successful.
This can show either a success or a failure message : - success : everything is good, the user is successfully authenticated and can close the page - failure : the authentication has been processed on the sith side, but the request to the callback url received an error. In such a case, there is nothing much we can do but to advice the user to contact the developers of the third-party app.