Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
15-437 OAuth 2.0
Search
ThierrySans
November 11, 2014
Education
160
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
15-437 OAuth 2.0
ThierrySans
November 11, 2014
More Decks by ThierrySans
See All by ThierrySans
CSCD27 Social Engineering
thierrysans
0
270
CSCD27 Web Security
thierrysans
0
450
CSCD27 Malicious Software
thierrysans
0
410
CSCD27 Protection
thierrysans
0
510
CSCD27 System Insecurity
thierrysans
0
440
CSCD27 Human Authentication
thierrysans
0
370
CSCD27 Network security
thierrysans
0
580
CSCD27 Network (in)security
thierrysans
0
570
CSCD27 Cryptography Protocols
thierrysans
0
730
Other Decks in Education
See All in Education
現場最前線から教えるデータサイエンス1 -ITベンダーにおけるデータサイエンティスト-
hidetoshikawaguchi
0
140
[2026前期火5] 論理学(京都大学文学部 前期 第9回)「正規化の停止性——ヒドラゲームによる証明」
yatabe
0
210
プログラミング言語において文字列を複数行にわたって だらだらと記載するアレ
sapi_kawahara
0
190
2026年度春学期 統計学 第11回 分布の「型」を考える - 確率分布モデルと正規分布 (2026. 6. 11)
akiraasano
PRO
0
150
プロポーザルを書く技術とアンチパターン/proposal-writing-and-antipatterns
moriyuya
13
3.6k
JAWS-UG初心者支部#81 GWにEduJAWSと何か作ろうもくもく会!
otsuki
0
150
Course Review - Lecture 13 - Information Visualisation (4019538FNR)
signer
PRO
1
2.7k
NDIAS Automotive / IoT CTF 2026 Recap - Keyfob & OSINT
himitu23
0
260
アラムコSTEAMチャレンジ 実践報告書
codeforeveryone
0
190
Interaction - Lecture 10 - Information Visualisation (4019538FNR)
signer
PRO
0
2.7k
Curso de Consagração ao Sagrado Coração de Jesus - O Sagrado Coração na História (Aula 01)
cm_manaus
0
260
[2026前期火5] 論理学(京都大学文学部 前期 第10回)「論理学の哲学——意味とは何か(Tonkと推論主義)」
yatabe
0
230
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.4k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Being A Developer After 40
akosma
91
590k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
The untapped power of vector embeddings
frankvandijk
2
1.8k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
260
Navigating Team Friction
lara
192
16k
Become a Pro
speakerdeck
PRO
31
6k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
So, you think you're a good person
axbom
PRO
2
2.1k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
400
Transcript
OAuth 2 Thierry Sans
Single-Sign-On (SSO) • Pubcookie (a.k.a webiso) • OpenID • SAML
(Security Assertion Markup Language) • OAuth • Mozilla Persona 1998 2005 2005 2010 2011 among others …
How OAuth 2 works
source: Choosing an SSO Strategy: SAML vs OAuth2
How to use OAuth The way OAuth is implemented by
Identity Providers varies • Google https://developers.google.com/accounts/docs/OAuth2 • Twitter https://dev.twitter.com/oauth • Facebook https://developers.facebook.com/docs/facebook-login/login-flow-for-web/v2.2 • Github https://developer.github.com/v3/oauth/
OAuth in Django • Python OAuth Toolkit https://django-oauth-toolkit.readthedocs.org/en/latest/ models.html •
Python Social OAuth https://github.com/omab/python-social-auth • django-allauth https://github.com/pennersr/django-allauth
Google Authentication with django-allauth
Configure Google On console.developers.google.com 1. Create a new project 2.
Create a new credential API management > Credentials
None
Install django-allauth $ pip install django-allauth
Configure the project and migrate INSTALLED_APPS = [ ...
'django.contrib.sites', 'allauth', 'allauth.account', ‘allauth.socialaccount', ‘allauth.socialaccount.providers.google', # use Google ] TEMPLATES = [ ... 'context_processors': [ ... 'django.template.context_processors.request', ], ... LOGIN_REDIRECT_URL = '/' AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'allauth.account.auth_backends.AuthenticationBackend', ) ACCOUNT_USERNAME_REQUIRED = False ACCOUNT_EMAIL_VERIFICATION = "none" SOCIALACCOUNT_QUERY_EMAIL = True SITE_ID = 1 simpsonsapp/settings.py
URLs # Authentication urlpatterns += [ url(r'^accounts/', include('allauth.urls')), url(r'^logout/$', views.logout_view,
name='logout'), ] simpsonsapp/settings.py
Configure the database - register site
Configure the database - use Google
Login page http://localhost:8000/accounts/login http://localhost:8000/accounts/google/login