This file is indexed.

/usr/share/pyshared/gluon/contrib/login_methods/linkedin_account.py is in python-gluon 1.99.7-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
This file is part of web2py Web Framework (Copyrighted, 2007-2009).
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>.
License: GPL v2

Thanks to Hans Donner <hans.donner@pobox.com> for GaeGoogleAccount.
"""

from gluon.http import HTTP
try:
    import linkedin
except ImportError:
    raise HTTP(400,"linkedin module not found")

class LinkedInAccount(object):
    """
    Login will be done via Google's Appengine login object, instead of web2py's
    login form.

    Include in your model (eg db.py)::

        from gluon.contrib.login_methods.linkedin_account import LinkedInAccount
        auth.settings.login_form=LinkedInAccount(request,KEY,SECRET,RETURN_URL)

    """

    def __init__(self,request,key,secret,return_url):
        self.request = request
        self.api = linkedin.LinkedIn(key,secret,return_url)
        self.token = result = self.api.requestToken()

    def login_url(self, next="/"):
        return self.api.getAuthorizeURL(self.token)

    def logout_url(self, next="/"):
        return ''

    def get_user(self):
        result = self.request.vars.verifier and self.api.accessToken(verifier = self.request.vars.verifier )
        if result:
            profile = self.api.GetProfile()
            profile = self.api.GetProfile(profile).public_url = "http://www.linkedin.com/in/ozgurv"
            return dict(first_name = profile.first_name,
                        last_name = profile.last_name,
                        username = profile.id)