SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
OAuth&2.0 
Because'API 
Emberfest)29/08/14
Theodor'Tonum 
@theodorton 
Developer(@(Skalar
Ember&=>&API
OAuth&101 
• Open&standard&for&authoriza2on 
• Access&to&a&users'&resources 
• Access&tokens&represent&user&creden2als 
• Can&limit&access&through&the&use&of&scopes
Allowing(an(applica,on(to(act( 
on(your(behalf(and(access( 
informa,on(from(an( 
applica,on(that(you(use. 
—(gmoore,(Stack(Overflow
Allowing(a(frontend( 
applica1on(to(act(on(your( 
behalf(and(access(informa1on( 
from(an(API(that(you(use.
OAuth&is&great&for&pla1orms
You$now$have$a$li-le 
ecosystem$of$your$own
Your%applica+on%is 
a%small%pla/orm
In#house)applica/ons)and) 
OAuth
Obtaining(an(access(token: 
The(/token(endpoint 
//"POST"/token 
//"Content-Type:"applica5on/json 
{ 
""""grant_type:""password", 
""""username:""foo@example.com", 
""""password:""none-of-your-business" 
} 
//"Response 
{ 
""""access_token:""my-secret-access-token" 
}
Implicit(authen.ca.on: 
The(/me(endpoint 
//"GET"/me 
//"Authoriza1on:"Bearer"my6secret6access6token 
{ 
""""users:"[{ 
""""""""id:"1, 
""""""""name:""Foo"Bar", 
""""""""email:""foo@example.com" 
""""}] 
}
The$access$token$must$always$be$ 
included$in$the$Authoriza7on$header.
Ember&library 
ember%simple%auth
Third&party+applica.ons+and+ 
OAuth
Obtaining(an(access(token: 
The(/oauth/authorize(endpoint 
var$redirectUri$=$encodeURIComponent("h6p://www.myapp.com/redirect.html"); 
window.loca?on$=$"h6p://www.example.com/oauth/authorize?"+ 
$$"response_type=token&"+ 
$$"client_id=CLIENT_ID&"+ 
$$"scopes=public"+ 
$$"redirect_uri="+redirectUri;
Receiving(the(token 
//"Success"returns"to: 
".../redirect.html#access_token=my:secret:access:token" 
//"Fail 
".../redirect.html#error=access_denied"
Scopes 
• Categorizes,resources,(and,ac2ons),you,want,to, 
protect 
• Combina2on,of,nouns,and,verbs 
• Presented,to,the,user,in,the,authoriza2on,step 
• Examples,from,Github:,user,,public_repo,, 
delete_repo
Ember&library 
ember%oauth2
Authen'ca'on+is+a+means+to+an+end, 
you+want+access+to+resources 
• Not%part%of%the%domain 
• Authoriza3on%is%clear%with%its%intent: 
"I%want%access%to%your%resource%X" 
• Makes%perfect%sense%for%third?party%apps 
• In?house%apps%are%authorized%by%default%(skip%UI) 
• Note:%OAuth%doesn't%replace%Devise%or%whatever% 
authen3ca3on%library%you%use%on%the%server
Let's&talk&about&pla.orm
Your%data%may%go%places%you've%never% 
expected
Third&party+applica.ons+are+good
Users%create%their%own%small% 
applica1ons 
IFTTT$&$Zapier$makes$users$into$developers
When%does%it%make%sense? 
• The$modern$web$app"You"have"separated"frontend" 
and"backend"with"an"Ember8app"and"an"API,"and" 
you"need"a"way"of"authen>ca>ng"with"the"API 
• The$pla/orm"You're"building"a"plaBorm,"want"to"let" 
developers"create"third8party"clients"and"you"care" 
about"your"users 
• Organiza4on"Your"organiza>on"manages"a"several" 
applica>ons"and"you"want"to"turn"authen>ca>on" 
and"authoriza>on"into"a"service
Main%problems%with%OAuth?
For$clients: 
Opinionated$ 
implementa2ons
For$providers: 
Opinionated$libraries
Summary 
• Modern(mechanism(for(auth 
• Control(over(third5party(applica8ons 
• Made(with(Ember.js(in(mind(5(so(simple!
Ques%ons?

Más contenido relacionado

Similar a OAuth 2.0 - Because API (6)

Por que eu deveria me importar com o OAuth2 e IdentityServer?
Por que eu deveria me importar com o OAuth2 e IdentityServer?Por que eu deveria me importar com o OAuth2 e IdentityServer?
Por que eu deveria me importar com o OAuth2 e IdentityServer?
 
Introduction to OAuth2.0
Introduction to OAuth2.0Introduction to OAuth2.0
Introduction to OAuth2.0
 
UserCentric Identity based Service Invocation
UserCentric Identity based Service InvocationUserCentric Identity based Service Invocation
UserCentric Identity based Service Invocation
 
OAuth you said
OAuth you saidOAuth you said
OAuth you said
 
Openid & Oauth: An Introduction
Openid & Oauth: An IntroductionOpenid & Oauth: An Introduction
Openid & Oauth: An Introduction
 
Mufix Network Programming Lecture
Mufix Network Programming LectureMufix Network Programming Lecture
Mufix Network Programming Lecture
 

Último

Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
F
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Monica Sydney
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 

Último (20)

Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
 

OAuth 2.0 - Because API