16
TF-EMC2 Tuesday, February 15 th , 2011 Brook Schofield Project Development Officer [email protected] www.terena.org Slide 1

TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer [email protected] Slide 1

Embed Size (px)

Citation preview

Page 1: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

TF-EMC2Tuesday, February 15th, 2011

Brook Schofield

Project Development Officer

[email protected]

www.terena.org

Slide 1

Page 2: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

› LinkedIn› Business/Professional Contact Directory› OAuth

› MySpace› 2nd Place to Facebook› OAuth

› Windows Live ID (Messanger Connect)› Big User Base (Hotmail, MSN)› Tried OpenID (then stopped)› Uses OAuth-WRAP (prelude to OAuth 2.0)

Slide 2

Page 3: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

› I’ve previously patched Twitter + Facebook› Copy + Paste Andreas’ authtwitter module› …but Twitter is sloppy!

› OAuth handling is very lax› authtwitter is a bad example :-( › Shared Data Structure came back to bite me.› LinkedIn is very strict!

› Two main components for an authsource› lib/source/AuthSource.php

› authenticate() and finalStep()› linkback.php

› Calls finalStep()

Slide 3

Page 4: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

› 2nd big Social Networking Platform.› Just opened an Australian office.› Wasn’t for Sale.

Slide 4

Page 5: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

› Very good dev tools + REST web client.

Slide 5

Page 6: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

› OAuth› …but very strict

› Required POST rather than GET + HEADERS

Slide 6

Page 7: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

Slide 7

Page 8: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

› https://api.linkedin.com/uas/oauth/requestToken› POST (current code uses a GET)› Callback should be here!

› https://www.linkedin.com/uas/oauth/authenticate?oauth_token=94ab03c4-ae2c-45e4-8732-0e6c4899db63› REDIRECT› Twitter puts the Callback here :-(

› https://api.linkedin.com/uas/oauth/accessToken› POST (current code uses a GET)

› https://api.linkedin.com/v1/people/~› GET (API to return user data)› Set Header: x-li-format: json for JSON response

Slide 8

Page 9: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

› AKA Messenger Connect

Slide 9

Page 10: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

Slide 10

Page 11: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

› 50k PHP Library from Microsoft – but replaced it with…

› $authorizeURL = 'https://consent.live.com/Connect.aspx'› . '?wrap_client_id=' . $this->key› . '&wrap_callback=' . › urlencode(SimpleSAML_Module::getModuleUrl('authwindowslive') › . '/linkback.php')› . '&wrap_client_state=' . urlencode($stateID)› . '&wrap_scope=WL_Profiles.View,Messenger.SignIn’› ;

› parse_str($result, $response);Slide 11

Page 12: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

Returned Generated

Myspace:displayName, hasApp, id, msUserType,familyName, givenName, profileUrl, thumbnailUrl

LinkedIn:summary, headline, id, lastName, specialties, pictureUrl, firstName

Windows Live ID:BaseUri, Id, SelfLink, Title, Updated, AllContactsLink, Cid, FirstName, LastNameMyActivitiesLink, StatusMessageLink, UxLink, _mail (generated format)

_targetedID_uid_user_username

Slide 12

Page 13: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

Slide 13

› Not unless it’s in simpleSAMLphp› TERENA Policy?› Dyonisius Policy?

› Encourages Collaboration!› If it’s good enough for TERENA it should be good

enough for the community!

› Dyonisius will tell you later today how it works.

Page 14: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

Slide 14

Page 15: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

Slide 15

Page 16: TF-EMC2 Tuesday, February 15 th, 2011 Brook Schofield Project Development Officer brook@terena.org  Slide 1

[email protected]

+31651553991

sip:[email protected]

skype://brookschofield

@BrookSchofield

facebook.com/brook.schofield

linkedin.com/in/brookschofield

Slide 16