Home | History | Annotate | Download | only in hello-python

Lines Matching refs:license

3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
36 # Valid access levels that may be returned by the license server.
41 """Fetches the license for a given user by making an OAuth signed request
42 to the license server.
74 """Returns the license for a given user as a structured object.
85 license = {'error': False, 'message': '', 'access': 'NO'}
91 logging.debug('Got license server response: %s' % json)
94 license['error'] = True
95 license['message'] = 'Could not parse the license server response'
97 logging.exception('Could not fetch license data')
98 license['error'] = True
99 license['message'] = 'Could not fetch license data'
102 license['error'] = True
103 license['message'] = json['error']['message']
105 license['access'] = json['accessLevel']
107 return license
117 # We should use federated_identity in production, since the license
130 'license': license_data,
137 # the license server doesn't support any other type of OpenID provider.