SlideShare a Scribd company logo
Using Google API in Go
Apr 20, 2013
Jongmin Kim
GDG Korea Golang
차례
 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
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 모델
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는 분리 가능
OAuth Service Providers




 KTH 개발자 블로그(http://dev.kthcorp.com/2012/12/12/oauth-2-0-open-api-auth/)
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)
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
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
API key
  모든 API 호출 시, 파라미터로 key={API_key}를 붙여준다.
  유저의 동의를 받지 않기 때문에 계정 정보에 접근하지는 못 한다.
  인가(authorization)을 위해 사용되는 것은 아니다.
필요 패키지들
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) 참고
Thank you
Jongmin Kim
GDG Korea Golang
(http://j.mp/Jongmin)

More Related Content

Viewers also liked (15)

PDF
10 reasons to be excited about go
Dvir Volk
 
PDF
Golang
Felipe Mamud
 
PPT
Google Go! language
André Mayer
 
PDF
협업도구 및 주요 Agile practices 적용사례 v1.0
Sangcheol Hwang
 
PDF
Introduction to go language programming
Mahmoud Masih Tehrani
 
PPTX
Golang
Michael Blake
 
PPT
Agile 방법론
Astin Choi
 
PPTX
Agile - SCRUM을 통한 개발관리
SangJin Kang
 
PDF
애자일 도입과 사례 공유
agilekorea
 
PDF
스크럼, 이걸 왜 하나요
Insub Lee
 
PDF
애자일의 모든것
KH Park (박경훈)
 
PPT
Go Programming Language - Learning The Go Lang way
IndicThreads
 
PPT
About Go
Jongmin Kim
 
PPT
Google's Go Programming Language - Introduction
Ganesh Samarthyam
 
PPT
Introduction to Go programming
Exotel
 
10 reasons to be excited about go
Dvir Volk
 
Golang
Felipe Mamud
 
Google Go! language
André Mayer
 
협업도구 및 주요 Agile practices 적용사례 v1.0
Sangcheol Hwang
 
Introduction to go language programming
Mahmoud Masih Tehrani
 
Agile 방법론
Astin Choi
 
Agile - SCRUM을 통한 개발관리
SangJin Kang
 
애자일 도입과 사례 공유
agilekorea
 
스크럼, 이걸 왜 하나요
Insub Lee
 
애자일의 모든것
KH Park (박경훈)
 
Go Programming Language - Learning The Go Lang way
IndicThreads
 
About Go
Jongmin Kim
 
Google's Go Programming Language - Introduction
Ganesh Samarthyam
 
Introduction to Go programming
Exotel
 

Similar to Using google api in go (20)

PDF
안드로이드 OAuth 1.0a, 2.0 구현 - Naver, Google API
Gosu Ok
 
PDF
[H3 2012] OAuth2 - API 인증을위한 만능 도구상자
KTH, 케이티하이텔
 
PDF
OAuth2 - API 인증을 위한 만능도구상자
Minwoo Park
 
PPTX
Open api개발을 위한 자료1
도성 김
 
PDF
OAuth2.0
YongHyuk Lee
 
PDF
Daum OAuth 2.0
Daum DNA
 
PPTX
우리 FISA 1차 기술 세미나 발표자료 : OAuth2.0과 JWT의 이해
am23am45
 
PPTX
SNS API분석 : OAuth 분석
jw Yoon
 
PPTX
REST API 설계
Terry Cho
 
PDF
03. HTTPS & Restful
Shin Kim
 
PDF
GDG Incheon Devfest 2016 - Google API로 만드는 더욱 더 풍부한 백오피스
MooYeol Lee
 
PPTX
Html5 kig 120315_res_tful_api
Seiyon Lee
 
PPT
Skcomms openapi
기덕 박기덕
 
PDF
기획자를 위한 OAuth
Minwoo Park
 
PDF
KTH_Detail day_화성에서 온 개발자 금성에서 온 기획자 시리즈_7차(2)_Oauth_박민우_20120718
KTH, 케이티하이텔
 
PPTX
OAuth - GDG Korea Women 2014 첫 스터디
Jua Alice Kim
 
PDF
[D2SF] Naver 오픈 API 가이드
NAVER D2 STARTUP FACTORY
 
PDF
스타트업을 위한 성공적인 Open AP 만들기 - 윤석찬 (2012)
Channy Yun
 
PDF
루비온레일즈 API 서버 - 4) api 서버 인증 구현 (쿠키/세션/토큰)
Junghyun Park
 
PPTX
생활코딩 oauth 소개
Binseop Ko
 
안드로이드 OAuth 1.0a, 2.0 구현 - Naver, Google API
Gosu Ok
 
[H3 2012] OAuth2 - API 인증을위한 만능 도구상자
KTH, 케이티하이텔
 
OAuth2 - API 인증을 위한 만능도구상자
Minwoo Park
 
Open api개발을 위한 자료1
도성 김
 
OAuth2.0
YongHyuk Lee
 
Daum OAuth 2.0
Daum DNA
 
우리 FISA 1차 기술 세미나 발표자료 : OAuth2.0과 JWT의 이해
am23am45
 
SNS API분석 : OAuth 분석
jw Yoon
 
REST API 설계
Terry Cho
 
03. HTTPS & Restful
Shin Kim
 
GDG Incheon Devfest 2016 - Google API로 만드는 더욱 더 풍부한 백오피스
MooYeol Lee
 
Html5 kig 120315_res_tful_api
Seiyon Lee
 
Skcomms openapi
기덕 박기덕
 
기획자를 위한 OAuth
Minwoo Park
 
KTH_Detail day_화성에서 온 개발자 금성에서 온 기획자 시리즈_7차(2)_Oauth_박민우_20120718
KTH, 케이티하이텔
 
OAuth - GDG Korea Women 2014 첫 스터디
Jua Alice Kim
 
[D2SF] Naver 오픈 API 가이드
NAVER D2 STARTUP FACTORY
 
스타트업을 위한 성공적인 Open AP 만들기 - 윤석찬 (2012)
Channy Yun
 
루비온레일즈 API 서버 - 4) api 서버 인증 구현 (쿠키/세션/토큰)
Junghyun Park
 
생활코딩 oauth 소개
Binseop Ko
 
Ad

Using google api in go

  • 1. Using Google API in Go Apr 20, 2013 Jongmin Kim GDG Korea Golang
  • 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) 참고
  • 11. Thank you Jongmin Kim GDG Korea Golang (http://j.mp/Jongmin)