bottle_auth/core/auth.py
def get_authenticated_user(self, callback):
        """Fetches the authenticated user data upon redirect."""
        # Look to see if we are doing combined OpenID/OAuth
        oauth_ns = ""
        for name, values in self.request.arguments.iteritems():
            if name.startswith("openid.ns.") and \
               values[-1] == u"http://specs.openid.net/extensions/oauth/1.0":
                oauth_ns = name[10:]
                break
        token = self.get_argument("openid." + oauth_ns + ".request_token", "")
        if token:
            http = httpclient.AsyncHTTPClient()
            token = dict(key=token, secret="")
            http.fetch(self._oauth_access_token_url(token),
                       self.async_callback(self._on_access_token, callback))
        else:
            OpenIdMixin.get_authenticated_user(self, callback)
def get_authenticated_user(self, callback):
        """Fetches the authenticated user data upon redirect."""
        # Look to see if we are doing combined OpenID/OAuth
        oauth_ns = ""
        for name, values in self.request.arguments.iteritems():
            if name.startswith("openid.ns.") and \
               values[-1] == u"http://specs.openid.net/extensions/oauth/1.0":
                oauth_ns = name[10:]
                break
        token = self.get_argument("openid." + oauth_ns + ".request_token", "")
        if token:
            http = httpclient.AsyncHTTPClient()
            token = dict(key=token, secret="")
            http.fetch(self._oauth_access_token_url(token),
                       self.async_callback(self._on_access_token, callback))
        else:
            OpenIdMixin.get_authenticated_user(self, callback)
def get_authenticated_user ( self , callback ) : # Look to see if we are doing combined OpenID/OAuth oauth_ns = "" for name , values in self . request . arguments . iteritems ( ) : if name . startswith ( "openid.ns." ) and values [ - 1 ] == u"http://specs.openid.net/extensions/oauth/1.0" : oauth_ns = name [ 10 : ] break token = self . get_argument ( "openid." + oauth_ns + ".request_token" , "" ) if token : http = httpclient . AsyncHTTPClient ( ) token = dict ( key = token , secret = "" ) http . fetch ( self . _oauth_access_token_url ( token ) , self . async_callback ( self . _on_access_token , callback ) ) else : OpenIdMixin . get_authenticated_user ( self , callback )
Fetches the authenticated user data upon redirect.
Fetches the authenticated user data upon redirect .