Logo Search packages:      
Sourcecode: ubuntu-sso-client version File versions  Download package

def ubuntu_sso::main::LoginProcessor::login (   self,
  realm,
  consumer_key,
  do_login = True 
)

Initiate an OAuth login

Definition at line 68 of file main.py.

00068                                                        :
        """Initiate an OAuth login"""
        logger.debug("Initiating OAuth login in LoginProcessor")
        self.realm = str(realm) # because they are dbus.Strings, not str
        self.consumer_key = str(consumer_key)

        logger.debug("Obtaining OAuth urls")
        (request_token_url, user_authorisation_url,
          access_token_url, consumer_secret) =  self.get_config_urls(realm)
        logger.debug("OAuth URLs are: request='%s', userauth='%s', " +\
                     "access='%s', secret='%s'", request_token_url,
                     user_authorisation_url, access_token_url, consumer_secret)

        from ubuntu_sso.auth import AuthorisationClient
        client = AuthorisationClient(self.realm,
                                     request_token_url,
                                     user_authorisation_url,
                                     access_token_url, self.consumer_key,
                                     consumer_secret,
                                     callback_parent=self.got_token,
                                     callback_denied=self.got_denial,
                                     callback_notoken=self.got_no_token,
                                     callback_error=self.got_error,
                                     do_login=do_login)

        logger.debug("Calling auth.client.ensure_access_token in thread")
        gobject.timeout_add_seconds(1, client.ensure_access_token)

    def clear_token(self, realm, consumer_key):


Generated by  Doxygen 1.6.0   Back to index