Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
15-437 OAuth 2.0
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ThierrySans
November 11, 2014
Education
170
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
15-437 OAuth 2.0
ThierrySans
November 11, 2014
Transcript
15 slides
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
More Decks by ThierrySans
See All by ThierrySans
CSCD27 Social Engineering
thierrysans
0
280
CSCD27 Web Security
thierrysans
0
480
CSCD27 Malicious Software
thierrysans
0
430
CSCD27 Protection
thierrysans
0
530
CSCD27 System Insecurity
thierrysans
0
490
CSCD27 Human Authentication
thierrysans
0
380
CSCD27 Network security
thierrysans
0
600
CSCD27 Network (in)security
thierrysans
0
580
CSCD27 Cryptography Protocols
thierrysans
0
760
Other Decks in Education
See All in Education
Requirements Analysis and Prototyping - Lecture 3 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.9k
Session 6 - Teknik Lobby dan Negosiasi
adeputra13
0
630
Session 7 - Teknik Lobby dan Negosiasi
adeputra13
0
220
Human Perception and Cognition - Lecture 4 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.8k
AI活用の基礎体験ハンズオン(松尾研 AXエバンジェリスト講座)
minorun365
PRO
13
16k
1007
cbtlibrary
0
280
生成AIとの付き合い方/ How to work with AI
kaityo256
PRO
3
1.2k
HTML5 and the Open Web Platform - Lecture 3 - Web Technologies (1019888BNR)
signer
PRO
3
3.6k
1014
cbtlibrary
0
250
Web 2.0 Patterns and Technologies - Lecture 8 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
Unit 3: Computing Paradigms
sonakv
0
130
Liburd and Stoll Farrell "Copyright Essentials From A to AI: A 2026 NISO Training Series, Session Two: Fair Use and the Public Domain"
baltimoreniso
0
200
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Being A Developer After 40
akosma
PRO
92
590k
Code Review Best Practice
trishagee
74
20k
Design in an AI World
tapps
1
390
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
300
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
550
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
470
Claude Code のすすめ
schroneko
67
230k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k