cas_server.forms module
forms for the app
- class cas_server.forms.BootsrapForm(*args, **kwargs)[source]
Bases:
django.forms.FormForm base class to use boostrap then rendering the form fields
- property media
Return all media required to render the widgets on this form.
- class cas_server.forms.BaseLogin(*args, **kwargs)[source]
Bases:
BootsrapFormBase form with all field possibly hidden on the login pages
- service
The service url for which the user want a ticket
- lt
A valid LoginTicket to prevent POST replay
- renew
Is the service asking the authentication renewal ?
- gateway
Url to redirect to if the authentication fail (user not authenticated or bad service)
- property media
Return all media required to render the widgets on this form.
- class cas_server.forms.WarnForm(*args, **kwargs)[source]
Bases:
BaseLoginForm used on warn page before emiting a ticket
- warned
Trueif the user has been warned of the ticket emission
- property media
Return all media required to render the widgets on this form.
- class cas_server.forms.FederateSelect(*args, **kwargs)[source]
Bases:
BaseLoginForm used on the login page when
settings.CAS_FEDERATEisTrueallowing the user to choose an identity provider.- provider
The providers the user can choose to be used as authentication backend
- warn
A checkbox to ask to be warn before emiting a ticket for another service
- property media
Return all media required to render the widgets on this form.
- class cas_server.forms.UserCredential(*args, **kwargs)[source]
Bases:
BaseLoginForm used on the login page to retrive user credentials
- username
The user username
- password
The user password
- warn
A checkbox to ask to be warn before emiting a ticket for another service
- property media
Return all media required to render the widgets on this form.
- class cas_server.forms.FederateUserCredential(*args, **kwargs)[source]
Bases:
UserCredentialForm used on a auto submited page for linking the views
FederateAuthandLoginView.On successful authentication on a provider, in the view
FederateAuthaFederatedUseris created bycas_server.federate.CASFederateValidateUser.verify_ticket()and the user is redirected toLoginView. This form is then automatically filled with infos matching the createdFederatedUserusing theticketas one time password and submited using javascript. If javascript is not enabled, a connect button is displayed.This stub authentication form, allow to implement the federated mode with very few modificatons to the
LoginViewview.- clean()[source]
Validate that the submited
usernameandpasswordare valid using theCASFederateAuthauth class.- Raises:
django.forms.ValidationError – if the
usernameandpassworddo not correspond to aFederatedUser.- Returns:
The cleaned POST data
- Return type:
dict
- property media
Return all media required to render the widgets on this form.
- class cas_server.forms.TicketForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]
Bases:
django.forms.ModelFormForm for Tickets in the admin interface
- property media
Return all media required to render the widgets on this form.