ݺߣ

ݺߣShare a Scribd company logo
Mon Raspberry PI a une identité !
Source:	http://bgr.com/2014/02/18/how-much-money-does-candy-crush-make/
Source:	http://bgr.com/2014/02/18/how-much-money-does-candy-crush-make/
“Candy	Crush	Saga	
receive	the	following	
information:	allow	public	
list	of	buddies	and	
complete	address	email.”
Mon Raspberry PI a une identité !
How	to	use	social	network
Joe
GET	/me?access_token
Get user	data
Scope:	public	profile,	mail,	friends…
Candy Crush
Mon Raspberry PI a une identité !
Candy Crush Facebook
Mon Raspberry PI a une identité !
“Candy	Crush	Saga	
receive	the	following	
information:	allow	public	
list	of	buddies	and	
complete	address	email.”
Mon Raspberry PI a une identité !
How	to	connect device to	user	
account easily and	smoothly?
◦ OAuth	device flow allow easy onboarding
◦ Token	is generated for	the	device tied to	
the	user
◦ Device connects service	API	securely
◦ User	Dashboard	allow to	manage	and	
revoke token
Mon Raspberry PI a une identité !
Device request device code
HTTP
{	
"device_code":	"7a95a0a4-6f13-42e3-ac3e-d3d159c94c55",
"user_code":"VAL12e0v",	
"verification_uri":"http://openam.example.com/openam/oauth2/devic
e/user",	
"interval"=5,
"expires_in":	300
}
Device token request loop
POST	/token HTTP/1.1	
curl
--data	client_id=myDeviceAgentProfile
--data	client_secret=password
--data	grant_type=http://oauth.net/grant_type/device/1.0	
--data	code=7a95a0a4-6f13-42e3-ac3e-d3d159c94c55	
http://openam.example.com/openam/oauth2/access_token
Device receive an	access token
HTTP/1.1	200	OK	
{	
"scope":	[	
"phone”,
"email”,
"address”,
"profile »
]	,
token_type":"Bearer",
"expires_in":"3599",
"access_token":"2c946f59-d365-4a10-9f81-9e538c2629a6"
}
What’s next?

More Related Content

Mon Raspberry PI a une identité !