ãVKontakte APIã¯OAuth 2.0ãªãŒãã³ãããã³ã«ã䜿çšããŠã¢ã¯ã»ã¹ããŒãååŸããŸãã åæã«ããŠãŒã¶ãŒã¯ã¢ããªã±ãŒã·ã§ã³ã«ãã°ã€ã³ãšãã¹ã¯ãŒãã転éããªããããã¢ã«ãŠã³ããå±éºã«ãããããããšã¯ãããŸããã -VK APIããã¥ã¡ã³ã
ãOAuthã¯ãã¢ãã€ã«ããã¹ã¯ããããããã³Webã¢ããªã±ãŒã·ã§ã³ã«ã·ã³ãã«ã§å®å šãªèªèšŒæ¹æ³ãæäŸãããªãŒãã³ãããã³ã«ã§ãã -ã¹ããŒã¬ã³oauth.netã®ç¡æ翻蚳ã
æ®å¿µãªãããå€ãã®å Žåããããã®ã¹ããŒãã¡ã³ãã¯ééã£ãŠããŸãã ãšã³ããŠãŒã¶ãŒã®èŠ³ç¹ãããããã³ç¬èªã®OAuthãããã€ããŒãå®è£ ããéã®äž¡æ¹ã§ãOAuthã䜿çšããŠå®å šã«äœæ¥ããæ¹æ³ããèªã¿ãã ãã-ç«ã®äžã§èªãã§ãã ããã ãããã®ã»ãã¥ãªãã£ã®åŽé¢ãèæ ®ãããŸãããçŸåšãå ¬éãããŠããåºçç©ã§ã¯ããŸã泚ç®ãããŠããŸããã
ææã¯ç¹å®ã®çšèªã§é£œåããŠãããèšç·Žãåããèªè åãã«èšèšãããŠããŸãã
èè ãã
èè ã¯æ å ±ã»ãã¥ãªãã£ã®åéã®å°é家ã§ã¯ãªãã100ïŒ æ£ãããšäž»åŒµããŠããŸããã ãšãã»ã€ã¯ã確ç«ããããã©ãã€ã ã§æŠäºã®çãåçãããè©Šã¿ã§ã¯ãªãã䜿çšãããæè¡ãšãã®é©çšå¯èœæ§ã®åéã«å¯Ÿããå¥å šãªå¥œå¥å¿ãšæ¹å€çãªæ 床ãèªè ã«åèµ·ããå¯èœæ§ãé«ãã 以äžã®ãã¹ãŠã¯ããããªãã¯APIãžã®ã¢ã¯ã»ã¹ãå¶åŸ¡ããããã®ä»ã®åæ§ã®ãããã³ã«ããã³ã¡ãœããã«ã€ããŠãå€å°ãªããšãåœãŠã¯ãŸããŸãã
æŽå²çèæ¯
ç§ãã¡ã¯æè¡ã®æ¥éãªçºå±ã®æ代ã«çããŠããŸãã æ°ãããã®ãèªç±ã«å©çšã§ããããã«ãªããç©æ¥µçã«ããã掻çšããé©çšæ§ã®éçãæŒãåºãããŸããŸãè€éã§å€æ§ãªåé¡ã解決ããŸããå€ãã®å Žåãã·ãªãŒãºã®èªç¥çæ¹æ³ã«ãã£ãŠå°ãããŸãããããã¯åé¡ãªãã倧äžå€«ã§ããããã圹ç«ã¡ãŸããããå€ãã®äººã䜿çšããŠããã®ã§ãããã¯è¯ãããšã§ããã ãã®ã¢ãããŒãã¯èªç¶ã§ããã»ãšãã©ã®ç¶æ³ã§æ©èœããç¹ã«å°æ°ã®äººã ãäœæ¥ã®çµæã䜿çšããå Žåãããã³ãšã©ãŒã®ã³ã¹ããäœãå ŽåãæéãšåŽåãããŸãè²»ããããšãªãçµæãåŸãããšãã§ããããã§ãã ç§ã®æèŠã§ã¯ããã®ããã«äœ¿çšå¢çãããã·ã¥ããããã¯ãããžãŒã®1ã€ã¯OAuthã§ãã
ãŸããå°ãæŽå²ããããŸããWikipediaã«ãããšããããã³ã«ã®äœæ¥ã¯2006幎11æã«å§ãŸããOAuthããŒãžã§ã³1.0ã¯2007幎12æ4æ¥ã«æ¿èªãããŸããã ããã¯ãFirefoxãWebéçºè ãã€ã³ã¿ãŒããããªã¿ã¯ã®ã³ã³ãã¥ãŒã¿ãŒã ãã§ãªããäžè¬ã®äººã ã®ãã·ã³ã§ãInternet Explorerã培åºçã«ããã·ã¥ãå§ãããšãã§ããã Facebookã¯ãã¹ãŠã®ã€ã³ã¿ãŒããããŠãŒã¶ãŒãå©çšã§ããããã«ãªããVKontakteãç»å ŽããGmailã¯æåŸ ãªãã§ç»é²ãéå§ããŸããã ã¢ãã€ã«ã€ã³ã¿ãŒãããã¯é ããã¹ããŒããã©ã³ã¯ãŸãã§ããã ãããã£ãŠãOAuthæšæºã®éçºè ã¯ããã©ãŠã¶ãå®å šã§ä¿¡é Œã§ãããŠãŒã¶ãŒãã€ã³ã¿ãŒããããªãœãŒã¹ã«ã¢ã¯ã»ã¹ããå¯äžã®æ¹æ³ã§ãããšèªç¶ã«ä¿¡ããŠããŸããã å§ä»»ç¶ãšãã©ãŠã¶ã®ã»ãã¥ãªãã£ã«å¯Ÿãã責任ã¯ããŠãŒã¶ãŒïŒPCã«æŽæ°ããã°ã©ã ãã€ã³ã¹ããŒã«ãããŠã€ã«ã¹ããªãããšãç£èŠããå¿ èŠæ§ã®åœ¢åŒïŒããã³éçºè ïŒãããã®åãæŽæ°ããã°ã©ã ãæäŸããå¿ èŠæ§ã®åœ¢åŒïŒã«åž°å±ããŸãã ãã®ãããªã·ã¹ãã ã¯é¢é£æ§ãããã次ã®æè¡ã®é£èºãèµ·ãããŸã§éåžžã«ããæ©èœããŸããã2007幎6æã«æåã®iPhoneãçºå£²ããã2008幎9æã«Android OSã®æåã®ããŒãžã§ã³ããªãªãŒã¹ãããŸããã
ãŠãŒã¶ãŒã»ãã¥ãªãã£
ã¢ãã€ã«ãã©ãããã©ãŒã ã®åžå ŽïŒãŸãã¯ãã©ãã«ã§ããããã£ã¹ããªãã¥ãŒã·ã§ã³ïŒã«åå ¥ããããšã§ããã©ãŠã¶ãŒã®å§ä»»ç¶ã®å§ä»»ç¶ãç¡é¢ä¿ã«ãªãã®ã¯ãªãã§ããïŒ
ã¢ãã€ã«ãã©ãããã©ãŒã ã®éçºè ã¯ãTCP / IPã¹ã¿ãã¯ãžã®ç¡æã¢ã¯ã»ã¹ãªã©ãã¢ããªã±ãŒã·ã§ã³ãäœæããããã®ååãªæ©äŒãããã°ã©ãã«æäŸããŸããã ãã®çµæããŠãŒã¶ãŒã¯ãŠãŒã¶ãŒåãšãã¹ã¯ãŒããå®éã«å ¥åããå Žæã確èªã§ããªããªããé©åãªWebãµã€ããããã®Webãã©ãŒã ãæ¬åœã«éããŠãããã©ããã確èªããæ¹æ³ããããŸããïŒããšãã°ãWebViewã䜿çšããŠããå ŽåïŒæªæã®ããã¢ããªã±ãŒã·ã§ã³éçºè ã«ããããŒã¹ãããŒã¯ãŸãã¯å ¥åããŒã¿ã ããã«ãã¢ãã€ã«ãã©ãããã©ãŒã ã®éçºè ã¯ããã¶ãã¶åã蟌ã¿ãã©ãŠã¶çšã®APIãæ¡åŒµããŠããããããã®ç¶æ³ãæªåãããŠããã ãã§ãã
ãã¹ã¯ãŒãå ¥åãã©ãŒã ãæ¬ç©ã®ããã«èŠããŠãããŠãŒã¶ãŒã¯ãã£ãšæ³šæããå¿ èŠããããåžå Žããã€ã³ã¹ããŒã«ããæåã®ã«ãŠã³ã¿ãŒã¢ããªã±ãŒã·ã§ã³ã«ãœãŒã·ã£ã«ãããã¯ãŒã¯ã®ãŠãŒã¶ãŒåãšãã¹ã¯ãŒããå ¥åããªãã§ãã ããã äžè¬ã«ããã¹ã¯ãŒãã®å ¥åãæ±ããããå Žåãæ£çŽãªã¢ããªã±ãŒã·ã§ã³ã¯ãããã察å¿ãããœãŒã·ã£ã«ãããã¯ãŒã¯ã®èªèšŒSDKã䜿çšãããããããã¯äœããééã£ãŠããããšã®æ確ãªå åã§ãã ãããå®éã«ã¯ããŠãŒã¶ãŒã¯ãã©ãŠã¶ãŒã®ãVKontakteçµç±ã§ãã°ã€ã³ãããã³ãFacebookã§ãã°ã€ã³ããã¿ã³ã«æ £ããŠãããããåããã¿ã³ã䜿çšããŠã¢ããªã±ãŒã·ã§ã³ã«ãã°ã€ã³ãšãã¹ã¯ãŒããå ¥åããããã®å¯Ÿå¿ãããã©ãŒã ã衚瀺ãããŠãæ··ä¹±ããŸããã ããªãåã«äžåºŠå€æŽããã1ã2åå ¥åããããã¹ã¯ãŒããçã ããã»ã©æãåºãã§ãããã ãã®ããã«ããã©ãŠã¶ãä»ããŠäœ¿çšããããšããŠãOAuthã«ãšã£ãŠéåžžã«æ·±å»ãªãã£ãã·ã³ã°ã®åé¡ã¯ããŸã£ããæ°ããã¬ãã«ã«ãŸã§äžæããŸãã
OAuthéçºè ã¯ãããäœãšèšã£ãŠããŸããïŒ 2012幎10æã«ãªãªãŒã¹ãããOAuth 2.0ã«ã¯ãã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ã«é¢ããèšèã¯ãããŸããã 2016幎2æã«ã®ã¿ç»å Žãããã€ãã£ãã¢ããªåãOAuth 2.0ãšããããã¥ã¡ã³ãã®æ«å®çã§ã¯ãã¢ããªã±ãŒã·ã§ã³éçºè ãšOAuthãããã€ããŒã¯ããŠãŒã¶ãŒãé »ç¹ã«ãã¹ã¯ãŒããå ¥åãããããŠãŒã¶ãŒããã°ã€ã³ããã¢ã«ãŠã³ãã«é¢é£ããæ å ±ã衚瀺ãããããªãããã«ããããšããå§ãããŸãã ãããã£ãŠããŠãŒã¶ãŒã¯æªæã®ããã¢ããªã±ãŒã·ã§ã³ã®å Žåã«äœãããããããšçãããšãã§ããŸãã
äžæ¹ãããããã®åœ¢åŒã®ãã¹ãŠã®äž»èŠãªOAuthãããã€ããŒã¯ãã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³çšã®SDKãæäŸããŸããããã«ãããOAuthã§ã¯ãªããããã€ããŒã®ã¢ããªã±ãŒã·ã§ã³ãä»ããŠãŠãŒã¶ãŒãæ¿èªã§ããŸãã äžèŠããã¹ãŠã¯åé¡ãããŸãããããŠãŒã¶ãŒããããã€ããŒã®ã¢ããªã±ãŒã·ã§ã³ã§æ¿èªãããŠããªãå Žåã¯ããŠãŒã¶ãŒåãšãã¹ã¯ãŒããå ¥åããããšããå§ãããŸãããããã€ããŒã®ã¢ããªã±ãŒã·ã§ã³ãã€ã³ã¹ããŒã«ãããŠããªãå ŽåãSDKã¯ã»ãšãã©ã®å Žåãæ¢ã«ããªãã¿ã®OAuthã®æ¿èªãéå§ããŸãããã£ãã·ã³ã°ã®æ°ãã掻ååéã
ãããã®åé¡ã«ãããããããã€ã³ã¿ãŒããããµãŒãã¹ã®ç¥èã®ãããŠãŒã¶ãŒã¯ãåçŽãªã«ãŒã«ã«åŸãã°ããã»ã©æªãã¯ãããŸããïŒãããã€ããŒã®OAuth Webãµã€ããŸãã¯ã¢ããªã±ãŒã·ã§ã³ã§ã®ã¿ãã¹ã¯ãŒããå ¥åãããŠãŒã¶ãŒã¯èªåçã«ã¢ã¯ã»ã¹ããã®ã§ã¯ãªããèªåã§ã¢ã¯ã»ã¹ããå Žåã®ã¿ã§ãã ã¯ããæŽæ°ãã€ã³ã¹ããŒã«ãããŠãããœãããŠã§ã¢ã®å¶åŸ¡ãå Žåã«ãã£ãŠã¯ãŠã€ã«ã¹å¯Ÿçã«å ããŠãããããã¹ãŠãå¯èœã§ãã
OAuthãããã€ããŒã®åé¡
ç§ãã¡èªèº«ãOAuthãããã€ããŒã«ãªãããïŒãŸãã¯ãã§ã«ïŒå Žåããã¹ãŠãããèå³æ·±ããã®ã«ãªããŸãã æ¿èªã³ãŒããããŒãå®è£ ããAPIãå¶åŸ¡ããããµãŒãã¹ã«ã®ã¿äœ¿çšãããŠãããšããŸããã-ãããŸã§ã®ãšããããã¹ãŠãããŸãããããã§ãã 次ã«ãå€éšãµãŒãã¹ã«ã¢ã¯ã»ã¹ããå¿ èŠããããŸãããããã¡ãããOAuthã¯ãã®ããã«èšèšãããŠããŸãããïŒã-ç§ãã¡ã¯èããŠããŸãã ããããããã§èããå¿ã³èŸŒãã§ããŸãïŒã©ã®ç¹å®ã®å€éšãµãŒãã¹ã䜿çšããã®ã§ããããïŒ ãããã®ãµãŒãã¹ãå®éã«ã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ã«ãªãå Žåã¯ã©ããªããŸããïŒ ããã§ã¯ãã¢ããªã±ãŒã·ã§ã³ã¯ã©ã®ããã«ããŠclient_idãšclient_secretã®ã»ãã¥ãªãã£ãä¿èšŒã§ããŸããïŒ ããã§ã¯ãæªæã®ããã¢ããªã±ãŒã·ã§ã³ãå®å šã«ç¡å®³ãªãµããããŠããã®ããã«ããããçš®é¡ã®äžåèªãè¡ã£ãŠãããã©ãããã©ã®ããã«ããŠèŠã€ããããšãã§ããŸããïŒ
æ®å¿µãªãããOAuth2ã¯ãã®è³ªåã«å¯ŸããåçãæäŸããŠããŸãããRFC6749ã®10.1ç¯ã®ã¿ããã¢ãã€ã«ãŸãã¯ã¯ã©ã€ã¢ã³ãã¢ããªã±ãŒã·ã§ã³ãšããŠå®è£ ãããOAuthã¯ã©ã€ã¢ã³ããèªèšŒããããã«ãã¹ã¯ãŒãïŒclient_secretã«ã€ããŠè©±ããŠããïŒã䜿çšããããšã¯çŠæ¢ïŒ!!!ïŒãã®ãã¹ã¯ãŒãïŒããã³äžæã®client_idïŒãããŠãŒã¶ãŒããã€ã¹äžã®ç¹å®ã®ã¢ããªã±ãŒã·ã§ã³ã€ã³ã¹ããŒã«ããšã«åå¥ã«çºè¡ãããå ŽåïŒãã ãããã®ãããªå Žåã«ã¯ã»ãšãã©é¢å¿ããããŸããïŒã 2017幎3æ2æ¥ä»ã®ããŒãžã§ã³ïŒ 段èœ8.8ã8.9 ïŒããå§ãŸããã¢ãã€ã«ã¯ã©ã€ã¢ã³ãåãOAuthãã®ãã©ããã¯ãã¢ããªã䞻匵ããHTTPS URIãªãã€ã¬ã¯ãã®äœ¿çšãææ¡ããŠããŸããããã®ã¢ãããŒãã®å®å šãªããŒãžã§ã³ãiOS 8ãAndroid 6.0ã®ã¿ã§å©çšã§ããããšãæå³ãããã®ã§ã¯ãããŸãããšã¢ãã ã ãã®ã¢ãããŒãã¯ãŠãŒã¶ãŒãæªæã®ããã¢ããªã±ãŒã·ã§ã³ããä¿è·ããŸãããOAuthãããã€ããŒãä»ã®client_idãåŒãç¶ãã æªæã®ããã¯ã©ã€ã¢ã³ããæ€åºããã®ã«åœ¹ç«ã¡ãŸããã åæã«ããã®æšæºã§ã¯ããããã€ããŒã®å®è£ ãã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ãšãµãŒããŒã¢ããªã±ãŒã·ã§ã³ãã©ã®ããã«åºå¥ãããã«ã€ããŠã®æšå¥šäºé ãæäŸããŠããŸããã ã€ãŸã å®éãclient_secretã»ãã¥ãªãã£ã¯å®å šã«ã¯ã©ã€ã¢ã³ãã®æã«ãããŸãããããã¯ç§ãã¡ã®å¶åŸ¡ãåã°ãªãå¯èœæ§ããããŸãã
ãŸããæšæºã¯ç§ãã¡ã®ã¢ã·ã¹ã¿ã³ãã§ã¯ãªãã®ã§ãç§ãã¡ã¯ç§ãã¡èªèº«ã®åžžèã䜿çšããŸãã ãµãŒããŒã¢ããªã±ãŒã·ã§ã³ã®ã¿ãå®è¡ããå¿ èŠããããšããŸã-ãã¹ãŠãæ¯èŒçåçŽã§ããåclient_idã«ãããŒã¯ã³ã®èŠæ±ãéä¿¡ã§ããIPã¢ãã¬ã¹ïŒãŸãã¯è€æ°ïŒããã€ã³ãããå¿ èŠããããŸãã ãã®ãªã¹ããäœæãããŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ãæäŸããããšãã§ããŸããäž»ãªããšã¯ããããã®ã¢ãã¬ã¹ãå€ãããªãããã«å¶åŸ¡ããããšã§ãã ãããŠã誰ãããã¹ãã£ã³ã°ãããã€ããŒã®ãµããããå šäœã玹ä»ãããã¹ãŠã®ã»ãã¥ãªãã£ã«å¥ããèš±ããŸããæ»æè ã1ã€ã®ããŒã¿ã»ã³ã¿ãŒã®ã¯ã©ã€ã¢ã³ãã§è§£æ±ºããã°ååã§ãã
ããŠãã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ãžã®ã¢ã¯ã»ã¹ãæäŸããå¿ èŠãããå Žåã¯ã©ãã§ããããã åœç€Ÿã®ãµãŒãã¹ã®äœ¿çšãç¹å®ã®æéãæå³ããã¢ããªã±ãŒã·ã§ã³ãåœç€Ÿã®ç®¡çäžã«ããå Žåãè³Œå ¥åŸã«AppStoreãšPlayããŒã±ãããæäŸããã¢ã«ãŠã³ãã¡ã«ããºã ã䜿çšã§ããŸãã ãããã®ã¢ã«ãŠã³ãã«ã¯ã¢ããªã±ãŒã·ã§ã³ã®ãã³ãã«IDãå«ãŸããç¹å®ã®ãŠãŒã¶ãŒã«é¢é£ä»ããããŠããããªã¯ãšã¹ããAppleãŸãã¯Googleã«éä¿¡ããããšã§ãµãŒããŒåŽã§ç¢ºèªã§ããŸãã ã¢ã«ãŠã³ãã®æ€èšŒã¯ãããšãã°ãã¢ã¯ã»ã¹ããŒã¯ã³ãŸãã¯æŽæ°ããŒã¯ã³ã®æŽæ°ã«é¢é£ä»ããããšãã§ããŸãã
ãµãŒãã¹ãç¡æã®å Žåããã®æ¹æ³ã¯æ©èœããªãå¯èœæ§ããããŸãããç¡æãã§è³Œå ¥ã§ããã«ãããããããã¢ããªã±ãŒã·ã§ã³ãŠãŒã¶ãŒã¯éè¡ã«ãŒãã®è©³çŽ°ãå ¥åããå¿ èŠããããŸãã ãŸããã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ãç§ãã¡ã®ãã®ã§ãªãå Žåããã®æ¹æ³ã¯æ©èœããŸããããã©ãããã©ãŒã éçºè ã¯ããµãŒãããŒãã£ã¢ããªã±ãŒã·ã§ã³ã§è³Œå ¥ãå¶åŸ¡ããã¡ã«ããºã ãæäŸããŸããã
ã¢ããªã±ãŒã·ã§ã³ã®ãŠãŒã¶ãŒãµãŒã¯ã«ïŒäŒæ¥ã®åŸæ¥å¡ãªã©ïŒãããç¥ãããå¶åŸ¡ãããŠããå Žåãã¯ã©ã€ã¢ã³ã蚌ææžã䜿çšããŠã¯ã©ã€ã¢ã³ããæ¿èªã§ããŸãã äžæ¹ããŠãŒã¶ãŒèšŒææžãäŒæ¥ã§ç©æ¥µçã«äœ¿çšãããŠããå ŽåãAPIãžã®ã¢ã¯ã»ã¹å¶åŸ¡ã¯ãç¬èªã®OAuthæ¡åŒµãå®è£ ããããããTLSã«åºã¥ããŠå®è£ ããæ¹ããããã䟿å©ã§ãã
ããã§ããã¢ããªã±ãŒã·ã§ã³ã®ãŠãŒã¶ãŒãµãŒã¯ã«ãååã«åºãããŠãŒã¶ãŒã«è³Œå ¥ãä¿ããã«ãŒãã®è©³çŽ°ãå ¥åãããããªãå Žåã¯ã©ãã§ããããã å°ãåãŸã§ã¯ãã¢ããªã±ãŒã·ã§ã³ã§client_idïŒclient_secretïŒãé£èªåããããšãšãOSãããã¯ãŒã¯ã¹ã¿ãã¯ã§æå·åãããŠããªããã©ãã£ãã¯ãååããããšã®é£ããã ãããããŸããã ãã®ãããªã¿ã¹ã¯ã®å ç¢ãªå®è£ ã«ã¯ãé«åºŠãªå°é家ãã¬ãŒãã³ã°ãšå€ãã®æéãå¿ èŠã§ãã ãããã£ãŠãäžå°äŒæ¥ãããªãŒã©ã³ã¹ã®ããã°ã©ããŒã«ã¯å®è³ªçã«ã¢ã¯ã»ã¹ã§ããŸããã
幞ãã«ããGoogleã¯ããæç¹ããSafetyNetãµãŒãã¹ãæäŸããŸããããã«ãããã¢ããªã±ãŒã·ã§ã³ã眲åãããããŒã®ãã£ã³ã¬ãŒããªã³ããšãã³ãã«IDãæ€çŽ¢ãããµãŒããŒåŽã§ãã®ããŒã¿ã確èªã§ããŸãïŒãµãŒãã¹ã®æ©èœã確èªãããšãã«ãå¥ã®åçãååŸããããšã¯ã§ããŸããã§ãã{ãisValidSignatureãïŒfalse}ïŒã ãã®APIã¯Google Play Servicesã®äžéšãšããŠæäŸãããçè«çã«ã¯Android 2.3以éã§PlayãµãŒãã¹ãæŽæ°ãããŠããã°å©çšå¯èœã§ãã
SafetyNetãä»ã®éçºè ã«ãã£ãŠå ¬éãããã¢ããªã±ãŒã·ã§ã³ã®ããŒã¿ã®ãã§ãã¯ãèš±å¯ãããã©ãããšããåé¡ã¯æªè§£æ±ºã®ãŸãŸã§ãããããã£ãŠãããã䜿çšããŠä»ã®ã¢ããªã±ãŒã·ã§ã³ããAPIãžã®ã¢ã¯ã»ã¹ãå¶åŸ¡ã§ããŸããïŒ ããã¥ã¡ã³ãã¯ãã®è³ªåã«å¯Ÿããæ確ãªçããäžããŸãããããã®ãããªã·ããªãªãæ瀺ããªãããŒã§æžãããŠããŸãã ãŸããGoogle Play Servicesã¯ãã¹ãŠã®åœã§å©çšã§ããããã§ã¯ãªããäžåœã®ã¡ãŒã«ãŒã®é»è©±ã§ã¯å©çšã§ããªãå ŽåããããŸãã
æ®å¿µãªãããçŸæç¹ã§ã¯Appleã¯åæ§ã®ãµãŒãã¹ãæäŸããŠããŸããã ãããããããã«ãããããã¯å€§ããªåé²ã§ãããå Žåã«ãã£ãŠã¯ãSafetyNetã䜿çšããããšã¯ãã¯ã©ã€ã¢ã³ãããã€ã¹çšã®ä»ã®èªèšŒã¡ã«ããºã ããã䟿å©ãããããŸããã
ææ¡ããããªãã·ã§ã³ãã©ããç§ãã¡ã«åããªãå Žåã¯ã©ãããŸããïŒ æ¬¡ã«ããããªãã¯APIã®éçºè ãšããŠãã¯ã©ã€ã¢ã³ãã¢ããªã±ãŒã·ã§ã³ã確å®ã«åºå¥ããããšã¯ã§ããããŠãŒã¶ãŒã¯ã©ã®APIãªãœãŒã¹ãã©ã®ã¢ããªã±ãŒã·ã§ã³ã«æäŸããããå®éã«å¶åŸ¡ã§ããªãããšã«æ³šæããå¿ èŠããããŸãã ã€ãŸããOAuthã®ã¹ã³ãŒããšclient_idã®æŠå¿µã«äŸåããããšã¯ã§ããŸãããããã¯ããããã³ã«ãæäŸããæ©èœã®çŽååã§ãã ãŸãã¯ãååãªèœåãšãªãœãŒã¹ãããã°ããµãŒããŒåŽã«ãã¥ãŒãªã¹ãã£ãã¯ã¢ã«ãŽãªãºã ãå®è£ ããŠãåœã®client_idã䜿çšããŠãªã¯ãšã¹ããå€æã§ããŸãã
äž»èŠãªOAuthãããã€ããŒãæåŸã®2ã€ïŒæ®ãã¯ããŸãã«ãå³ããå¶éã課ããŠããïŒã®1ã€ã䜿çšããOAuthãåé¿ããããã«ããã§ææ¡ãããŠããã¡ãœããã䜿çšããããšãæã¿ãŸãã éæ¥çã«ãããã¯ãããšãã°ãVKontakteãç¹å®ã®ä¿¡é Œã§ããã¢ããªã±ãŒã·ã§ã³ã«ã®ã¿ãŠãŒã¶ãŒã®ã¡ãŒã«ãžã®ã¢ã¯ã»ã¹ãèš±å¯ããåã«ããã®ãããªèŠæ±ããããªãã¯APIã«å«ãŸãããšããäºå®ã«ãã£ãŠç€ºãããšãã§ããŸã ã
åèš
äžèšã®ãã¹ãŠãããOAuthã¯å®éã«ã¯ãTLSãSSHãªã©ã®ç£æ¥æè¡ã®äœ¿çšãæ瀺ããããã«äœ¿çšãããã»ãã¥ãªãã£ã®ã¬ãã«ããéåžžã«é ããã®ã§ãããšçµè«ä»ããããšãã§ããŸãã OAuthãããã€ããŒãå®è£ ããå Žåããã®å®è£ ã®å©ç¹ãšæœåšçãªãã¹ãŠã®ã»ãã¥ãªãã£åé¡ãæ éã«æ€èšããå¿ èŠããããŸãã ãŸããäžè¬çãªWebãã¬ãŒã ã¯ãŒã¯ã®äœæè ã«ç¥ãããŠããã©ã€ãã©ãªã¯ã©ããèæ ®ã«å ¥ããŠããªããããäžèšã®åé¡ã«å¯ŸããŠé©åãªåé¿çãå®è£ ããå¿ èŠããããŸãã ã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ããAPIã«ã¢ã¯ã»ã¹ããã«ã¯ããŠãŒã¶ãŒã®OAuthãšããåãããããã®æãå®å šãªæ¹æ³ã䜿çšããŠç¬èªã®SDKãéçºããããšãçã«ããªã£ãŠããå ŽåããããŸãã
èè ã¯ããã®è³æãæºåããããã®å»ºèšçãªã³ã¡ã³ããšæ¯æŽã«å人ãååã«æè¬ããŸãããŸããApple iOS SDKã®æ©èœã®èª¿æ»ã«ååããŠãããSergey Mackenuã«æè¬ããŸãã
OAuthããŽã¯Chris Messinaã«ãã£ãŠèšèšããã Creative Commons Attribution ShareAlike 3.0ã©ã€ã»ã³ã¹ã®äžã§é åžãããŠããŸãã
UPD 05/11/2017 ïŒæããã«ãOAuthã«ã¯å¥ã®ãã£ãã·ã³ã°æ»æãã¯ãã«ããããŸããããããé²ãããšã¯éåžžã«å°é£ã§ããRIAã€ã³ã¿ãŒãã§ãŒã¹ã«èªèšŒããŒãžãå°å ¥ããŸãã ããã¯ãGMailãŠãŒã¶ãŒã«å¯Ÿããæè¿ã®æ»æã®æåã«ãã£ãŠèšŒæãããå¯èœæ§ããããŸã ã
UPD 05/13/2017 ïŒGoogleã¯ã WebViewãä»ããŠOAuthèªèšŒããŒãžã®ãªãŒãã³ããããã¯ããããšã«ãããOAuthãã£ãã·ã³ã°ãšã®éããç¶ããŠããŸãã ç§ã®æèŠã§ã¯ãUserAgentããããŒã¯äŸç¶ãšããŠæ»æè ã«ãã£ãŠæžãæããããå¯èœæ§ããããããããã¯ååã®å¯Ÿçã«éããŸããã ãã©ãŠã¶ã®ä»ã®éç«ã£ãæ©èœãã·ãã¥ã¬ãŒãããããšãã§ããŸãã