-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3dd281d
commit ab335af
Showing
29 changed files
with
2,956 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
*.py[co] | ||
|
||
# When this repository is included as a | ||
# submodule within a buildout project, | ||
# buildout will dump a .egg-info directory | ||
# into this directory causing the submodule | ||
# to become "dirty", and this shows up | ||
# as a change to track in the parent repository. | ||
# Therefore, we ignore *.egg-info at the | ||
# repository level. | ||
*.egg-info | ||
|
||
|
||
# OSX | ||
.DS_Store | ||
|
||
# PyCharm | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
EngineAuth is maintained by Kyle Finley <kyle.finley@gmail.com>. | ||
|
||
Contributors: | ||
|
||
|
||
EngineAuth includes code or ideas ported or adapted from the following projects: | ||
|
||
- `webapp2 <http://code.google.com/p/webapp-improved/>`_: | ||
- Copyright (c) 2010 Rodrigo Moraes. | ||
- Apache 2.0 License. | ||
|
||
- `Google APIs Client Library for Python <http://code.google.com/p/google-api-python-client/>`_: | ||
- Copyright (c) 2010 Google Inc. | ||
- Apache 2.0 License. | ||
|
||
- `OmniAuth <https://github.com/intridea/omniauth>`_: | ||
- Copyright (c) 2010-2011 Michael Bleigh and Intridea, Inc. | ||
- MIT License. | ||
|
||
- `Google App Engine SDK <http://code.google.com/appengine/>`_: | ||
- Copyright (c) 2008 Google Inc. | ||
- Apache 2.0 License. | ||
|
||
- `WebOb <http://pythonpaste.org/webob/>`_: | ||
- Copyright (c) 2007 Ian Bicking and Contributors. | ||
- MIT License. | ||
|
||
- `Werkzeug <http://werkzeug.pocoo.org/>`_: | ||
- Copyright (c) 2011 Werkzeug Team. | ||
- BSD License. | ||
|
||
- `Tornado <http://www.tornadoweb.org/>`_: | ||
- Copyright (c) 2009 Facebook. | ||
- Apache 2.0 License. | ||
|
||
- `Flask <http://flask.pocoo.org/>`_: | ||
- Copyright (c) 2010 Armin Ronacher and Contributors. | ||
- BSD License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Version 0.1 - December 11, 2011 | ||
=============================== | ||
- Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,242 @@ | ||
EngineAuth | ||
============ | ||
Copyright 2011 Kyle Finley. | ||
All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
|
||
webapp2 | ||
======= | ||
Copyright 2010 Rodrigo Moraes. | ||
All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
|
||
oauth2client | ||
============ | ||
Copyright (C) 2010 Google Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
|
||
apiclient | ||
========= | ||
Copyright (C) 2010 Google Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
|
||
httplib2 | ||
======== | ||
Copyright (c) 2006 Joe Gregorio. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
||
|
||
OmniAuth | ||
======== | ||
Copyright (c) 2010-2011 Michael Bleigh and Intridea, Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
||
|
||
GOOGLE APP ENGINE SDK | ||
===================== | ||
Copyright 2008 Google Inc. | ||
All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
|
||
WebOb | ||
===== | ||
Copyright (c) 2007 Ian Bicking and Contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
||
|
||
Werkzeug | ||
======== | ||
Copyright (c) 2011 by the Werkzeug Team, see AUTHORS for more details. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
|
||
* The names of the contributors may not be used to endorse or | ||
promote products derived from this software without specific | ||
prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
|
||
Tornado | ||
======= | ||
Copyright 2009 Facebook | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
not use this file except in compliance with the License. You may obtain | ||
a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
License for the specific language governing permissions and limitations | ||
under the License. | ||
|
||
|
||
Flask | ||
===== | ||
Copyright (c) 2010 by Armin Ronacher and contributors. See AUTHORS | ||
for more details. | ||
|
||
Some rights reserved. | ||
|
||
Redistribution and use in source and binary forms of the software as well | ||
as documentation, with or without modification, are permitted provided | ||
that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
|
||
* The names of the contributors may not be used to endorse or | ||
promote products derived from this software without specific | ||
prior written permission. | ||
|
||
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND | ||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT | ||
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER | ||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# EngineAuth: Google App Engine Multi-Authentication Simplified. # | ||
|
||
## Dependancies ## | ||
|
||
[oauth2client](http://code.google.com/p/google-api-python-client/) | ||
|
||
[httplib2](http://code.google.com/p/httplib2) | ||
|
||
[uri-templates](http://code.google.com/p/uri-templates) | ||
|
||
[python-gflags](http://code.google.com/p/python-gflags) | ||
|
||
[python-oauth2](http://github.com/simplegeo/python-oauth2) | ||
|
||
## Installation ## | ||
|
||
- Copy `engineauth` directory and the contents of `lib` directory to your project's `root` directory. | ||
|
||
### Acquiring Client Keys ### | ||
|
||
#### Facebook #### | ||
1. Go to: [https://developers.facebook.com/apps](https://developers.facebook.com/apps) | ||
2. Select your application | ||
3. Copy `App ID/API Key` as `client_id` | ||
4. Copy `App Secret` as `client_secret` | ||
|
||
#### Google Plus #### | ||
|
||
1. Go to: [https://code.google.com/apis/console](https://code.google.com/apis/console) | ||
2. Select your application | ||
3. Choose `API Access` | ||
4. If you have not generated a client id, do so. | ||
|
||
#### AppEngine OpenID #### | ||
|
||
1. Go to: [https://appengine.google.com](https://appengine.google.com) | ||
2. Select your application | ||
3. Choose `Application Settings` | ||
4. Choose `(Experimental Federated Login)` from the `Authentication Options` drop down | ||
5. Click Save | ||
|
||
In your `app.yaml` add: | ||
|
||
```yaml | ||
|
||
- url: /auth.* | ||
script: engineauth.main.application | ||
|
||
``` | ||
|
||
In your `appengine_config.py` add: | ||
|
||
```python | ||
|
||
config['engineauth.sessions'] = { | ||
'secret_key': 'CHANGE_TO_A_RANDOM_STRING', | ||
} | ||
|
||
config['engineauth.auth'] = { | ||
'user_model': 'engineauth.models.User', | ||
'session_backend': 'datastore', | ||
} | ||
|
||
# Facebook Authentication | ||
config['engineauth.facebook'] = { | ||
'client_id': 'CHANGE_TO_FACEBOOK_APP_ID', | ||
'client_secret': 'CHANGE_TO_FACEBOOK_CLIENT_SECRET', | ||
'scope': 'email', | ||
} | ||
|
||
# Google Plus Authentication | ||
config['engineauth.google'] = { | ||
'client_id': 'CHANGE_TO_GOOGLE_CLIENT_ID', | ||
'client_secret': 'CHANGE_TO_GOOGLE_CLIENT_SECRET', | ||
'api_key': 'CHANGE_TO_GOOGLE_API_KEY', | ||
'scope': 'https://www.googleapis.com/auth/plus.me', | ||
} | ||
|
||
``` | ||
|
Empty file.
Oops, something went wrong.