[ English | 中文 (简体, 中国) | русский | português (Brasil) | नेपाली | 한국어 (대한민국) | Indonesia | français | español | esperanto | English (United Kingdom) | Deutsch ]
The Views Module¶
-
class
openstack_auth.views.
PasswordView
(**kwargs)[исходный код]¶ Changes user’s password when it’s expired or otherwise inaccessible.
-
form_class
¶ alias of
openstack_auth.forms.Password
-
form_valid
(form)[исходный код]¶ If the form is valid, redirect to the supplied URL.
-
get_initial
()[исходный код]¶ Return the initial data to use for forms on this view.
-
-
class
openstack_auth.views.
TotpView
(**kwargs)[исходный код]¶ Logs a user in using a TOTP authentification
-
form_class
¶
-
form_invalid
(form)[исходный код]¶ If the form is invalid, render the invalid form.
-
form_valid
(form)[исходный код]¶ If the form is valid, redirect to the supplied URL.
-
get_initial
()[исходный код]¶ Return the initial data to use for forms on this view.
-
-
openstack_auth.views.
login
(request)[исходный код]¶ Logs a user in using the
Login
form.
-
openstack_auth.views.
logout
(request, login_url=None, **kwargs)[исходный код]¶ Logs out the user if he is logged in. Then redirects to the log-in page.
- Параметры
login_url – Once logged out, defines the URL where to redirect after login
kwargs – see django.contrib.auth.views.logout_then_login extra parameters.
-
openstack_auth.views.
switch
(request, tenant_id, redirect_field_name='next')[исходный код]¶ Switches an authenticated user from one project to another.
-
openstack_auth.views.
switch_keystone_provider
(request, keystone_provider=None, redirect_field_name='next')[исходный код]¶ Switches the user’s keystone provider using K2K Federation
If keystone_provider is given then we switch the user to the keystone provider using K2K federation. Otherwise if keystone_provider is None then we switch the user back to the Identity Provider Keystone which a non federated token auth will be used.
-
openstack_auth.views.
switch_region
(request, region_name, redirect_field_name='next')[исходный код]¶ Switches the user’s region for all services except Identity service.
The region will be switched if the given region is one of the regions available for the scoped project. Otherwise the region is not switched.
-
openstack_auth.views.
switch_system_scope
(request, redirect_field_name='next')[исходный код]¶ Switches an authenticated user from one system to another.
-
openstack_auth.views.
websso
(request)[исходный код]¶ Logs a user in using a token from Keystone’s POST.