2. 차례
OAuth
API console, API explorer 등의 도구들
Keys, access, security, and identity
Google API를 사용하기 위한 패키지들
Web applications 인증 데모
Service accounts 인증 데모
Google APIs Directory Service
Google Auth Proxy by Bitly
3. OAuth 1.0a
Atoiain Ouhram"tp/aigol.o/,
uhrzto: At el=ht:/p.ogecm"
ouhcnue_e=08b98jh2"
at_osmrky"65d14fq2,
ouhtkn"d8jd3kr7,
at_oe=a10j73lu"
ouhsgauemto=HA-H1,
at_intr_ehd"MCSA"
ouhsgaue"OI925FDivbSK2P%D,
at_intr=wJOAWmwgDZTM%FY3"
ouhtmsap"3110"
at_ietm=17320,
ouhnne"521e81dd52c1816,
at_oc=476646666746667"
ouhvrin"."
at_eso=10
HMAC을 이용한 암호화 인증 방식만 제공
매번 signature를 생성해야 함
curl 등으로 테스트해보기 어려움
기본적으로 3-legged 모델
4. OAuth 2.0
3-legged 뿐만 아니라 2-legged 모델도 지원
아직 draft 버전 31. Google은 22 구현. Facebook은 12 구현
Client(1.0a에서 Consumer)는 Public Client와 Confidential Client로 크게 나뉨
명칭이 아래처럼 바뀜
10
.a 20
.
Ue
sr → Rsuc Onr
eore we
Cnue
osmr → Cin
let
SriePoie
evc rvdr → AtoiainSre +Rsuc Sre
uhrzto evr eore evr
Authorization Server와 Resource Server는 분리 가능
5. OAuth Service Providers
KTH 개발자 블로그(http://dev.kthcorp.com/2012/12/12/oauth-2-0-open-api-auth/)
6. Useful Tools
API console (https://code.google.com/apis/console/?pli=1#project:474377512137)
OAuth 2.0 Playground (https://developers.google.com/oauthplayground/)
APIs Explorer (https://developers.google.com/apis-explorer/#s/)
Ajax Code Playground (https://code.google.com/apis/ajax/playground/)
Authorized Access to your Google Account (https://accounts.google.com/b/0/IssuedAuthSubTokens)
7. Keys, access, security, and identity
The APIs represented in the Google APIs Console require that requests include a
unique project identifier. This enables the Console to tie a request to a specific project
in order to monitor traffic, enforce quotas, and handle billing. Google supports two
separate mechanisms to create a unique project identifier: OAuth 2.0 client IDs and API
keys.
OAuth 2.0 client ID
API key
8. OAuth 2.0 client ID
client ID를 만들 수 있는 종류와 Google이 지원하는 OAuth 2.0 시나리오
Web application: Login, Web Server Applications, Client-side Applications
Service account: Service Accounts
Installed application: Installed Applications, Devices
9. API key
모든 API 호출 시, 파라미터로 key={API_key}를 붙여준다.
유저의 동의를 받지 않기 때문에 계정 정보에 접근하지는 못 한다.
인가(authorization)을 위해 사용되는 것은 아니다.
10. 필요 패키지들
OAuth 2.0 패키지
$g gtcd.ogecmpgat2
o e oegol.o//ouh
Google APIs Client Library for Go
$g gtcd.ogecmpgol-p-ocin
o e oegol.o//ogeaig-let
다른 언어용 라이브러리들은 여기(https://developers.google.com/discovery/libraries) 참고