l.s.v.b.l.BaseTokenView : class documentation

Part of lp.services.verification.browser.logintoken View In Hierarchy

Known subclasses: lp.services.verification.browser.logintoken.BugTrackerHandshakeView, lp.services.verification.browser.logintoken.ClaimTeamView, lp.services.verification.browser.logintoken.MergePeopleView, lp.services.verification.browser.logintoken.ValidateEmailView, lp.services.verification.browser.logintoken.ValidateGPGKeyView

A view class to be used by other {Login,Auth}Token views.
Method next_url The next URL to redirect to on successful form submission.
Method page_title The page title.
Method redirectIfInvalidOrConsumedToken If this is a consumed or invalid token redirect to the LoginToken
Method success Indicate to the user that the token was successfully processed.
Method _cancel Consume the LoginToken and set self._next_url_for_cancel.
@property
def next_url(self):
The next URL to redirect to on successful form submission.

When the cancel action is used, self._next_url_for_cancel won't be None so we return that. Otherwise we return self.default_next_url.

@property
def page_title(self):
The page title.
def redirectIfInvalidOrConsumedToken(self):
If this is a consumed or invalid token redirect to the LoginToken default view and return True.

An invalid token is a token used for a purpose it wasn't generated for (i.e. create a new account with a VALIDATEEMAIL token).

def success(self, message):
Indicate to the user that the token was successfully processed.

This involves adding a notification message, and redirecting the user to their Launchpad page.

def _cancel(self):
Consume the LoginToken and set self._next_url_for_cancel.

_next_url_for_cancel is set to the home page of this LoginToken's requester.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.