Beispiel #1
0
    def handle_callback(self, response):
        """View called when the Oauth flow is completed. Adds a new BoxUserSettings
        record to the user and saves the user's access token and account info.
        """
        client = FigshareClient(response['access_token'])
        about = client.userinfo()

        return {
            'provider_id': about['id'],
            'display_name': '{} {}'.format(about['first_name'], about.get('last_name')),
        }
Beispiel #2
0
    def handle_callback(self, response):
        """View called when the Oauth flow is completed. Adds a new BoxUserSettings
        record to the user and saves the user's access token and account info.
        """
        client = FigshareClient(response['access_token'])
        about = client.userinfo()

        return {
            'provider_id':
            about['id'],
            'display_name':
            '{} {}'.format(about['first_name'], about.get('last_name')),
        }