Пример #1
0
 def openid_request(self, extra_params=None):
     """Return openid request"""
     try:
         return self.consumer().begin(url_add_parameters(self.openid_url(),
                                                         extra_params))
     except DiscoveryFailure, err:
         raise AuthException(self, 'OpenID discovery error: %s' % err)
Пример #2
0
 def get_redirect_uri(self, state):
     """Build redirect_uri with redirect_state parameter."""
     uri = self.redirect_uri
     if self.REDIRECT_STATE:
         uri = url_add_parameters(uri, {'redirect_state': state})
     return uri