Slide 1

Slide 1 text

1BTTQPSUͰ͸͡ΊΔ
 0"VUI !-BSBWFM0TBLB TBU.05&9*OD )JOBMPF

Slide 2

Slide 2 text

"CPVUNF w ौ୩Ͱಇ͍ͯΔژ౎ͷֶੜ w ීஈ͸8PSE1SFTTͷਓ w -BSBWFMॳ৺ऀ !IOMF !IJOBMPF !IOBMPF CMPHIJOBMPFOFU )/)JOBMPF

Slide 3

Slide 3 text

͍͖ͳΓͰ͕͢ʜʜ 20"VUIΛ࢖ͬͨ͜ͱ͕͋Δͬͯํ Ͳͷ͘Β͍ډ·͔͢ʁ
 ϓϩόΠμɺΫϥΠΞϯτ໰Θͣ

Slide 4

Slide 4 text

͍͖ͳΓͰ͕͢ʜʜ 2Ͱ͸ɺͦͷதͰ΋
 ʮ0"VUIϓϩόΠμΛ࡞ͬͨ͜ͱ ͕͋Δʂʯͱ͍͏ํ

Slide 5

Slide 5 text

1BTTQPSU w -BSBWFM͔Βެࣜύοέʔδʹͳͬͨ 0"VUI1SPWJEFS

Slide 6

Slide 6 text

8IBUT0"VUI

Slide 7

Slide 7 text

0"VUI w 0"VUI ΦʔΦʔε ͸ɺݖݶͷೝՄ BVUIPSJ[BUJPO Λߦ͏ͨΊͷΦʔϓϯελϯμʔ υͰ͋Δɻ 8JLJQFEJB

Slide 8

Slide 8 text

0"VUI w ֎෦αʔϏεʹ"1*΁ͷΞΫηεΛೝՄ͢Δ࣌౳ʹ
 ͔ͭΘΕΔ w (PPHMF w 'BDFCPPL w (JU)VC w %SPQCPY w 4MBDL w 5XJUUFS w BOEFUDʜʜ

Slide 9

Slide 9 text

0"VUI

Slide 10

Slide 10 text

0"VUI

Slide 11

Slide 11 text

0"VUI

Slide 12

Slide 12 text

0"VUI

Slide 13

Slide 13 text

0"VUI

Slide 14

Slide 14 text

0"VUI  ͜Ε͸0"VUIB

Slide 15

Slide 15 text

0"VUI 5XJUUFS͸"QQMJDBUJPOPOMZBVUIFOUJDBUJPOʹ࠾༻ IUUQTEFWUXJUUFSDPNPBVUIBQQMJDBUJPOPOMZ

Slide 16

Slide 16 text

0"VUI͕Մೳʹ͢Δ͜ͱ w ΞϓϦέʔγϣϯ΁ͷΞΫηεΛೝՄ w ֎෦ΞϓϦέʔγϣϯ౳ͱͷ࿈ܞ w ϞόΠϧΞϓϦ౳͔ΒͷϩάΠϯɾೝূ w ϑϩϯτͱαʔόʔͷ෼཭

Slide 17

Slide 17 text

0"VUIͷϑϩʔ IUUQTXXXEJHJUBMPDFBODPNDPNNVOJUZUVUPSJBMTBOJOUSPEVDUJPOUPPBVUI

Slide 18

Slide 18 text

ͪͳΈʹ0"VUI͸ʜʜ https://www-10.lotus.com/ldd/appdevwiki.nsf/xpAPIViewer.xsp?lookupName=API +Reference#action=openDocument&res_title=OAuth_1.0a_APIs_for_web_server_flow_sbt&content=apicontent

Slide 19

Slide 19 text

0"VUI͸
 ΫϥΠΞϯτ࣮૷ָ͕ w )5514Λલఏͱͨ͠ೝূ
 ˠϦΫΤετ࣌ʹ)FBEFSΛ౤͛Δ͚ͩ
 ˠೝՄϓϩηε͕Θ͔Γ΍͍͢
 ˠෳࡶͳγάωνϟΛϦΫΤετຖʹܭࢉ͢Δ
 ɹඞཁ͕ͳ͍ɺCPEZ͸ͦͷ··౤͛ΒΕΔ
 ˠϑϩϯτ+4ʹ΋૊ΈࠐΈ΍͍͢ ᠘͸͋Δ

Slide 20

Slide 20 text

-BSBWFMͱ0"VUI ·Ͱ

Slide 21

Slide 21 text

-BSBWFMͱ0"VUI ͔Β a㊗ެࣜύοέʔδԽʂ

Slide 22

Slide 22 text

ͪͳΈʹ-BSBWFMΞϓϦʹ
 ଞαʔϏεͷ440Λ͚ͭΔʹ͸ʜ ಉ͘͡ެࣜύοέʔδͷTPDJBMJUF͕࢖͑·͢ ͓ͦΒ͘1BTTQPSUͷΫϥΠΞϯτʹ΋࢖༻Մ

Slide 23

Slide 23 text

Feature of Passport

Slide 24

Slide 24 text

1BTTQPSU͸0"VUI1SPWJEFSϥΠϒϥϦͷ
 MFBHVFPBVUITFSWFS ͷ-BSBWFM޲͚ϥούʔΈ͍ͨͳ΋ͷ આ໌͕ࡶ

Slide 25

Slide 25 text

-FBHVFPBVUITFSWFS͕
 σϑΥϧτͰαϙʔτͯ͠ΔHSBOU@UZQF BVUIPSJ[BUJPO@DPEFˠೝՄίʔυϑϩʔ DMJFOU@DSFEFOUJBMT
 ˠ͍ΘΏΔʮΞϓϦέʔγϣϯೝূʯ FY5XJUUFS JNQMJDJUˠDPEFͱࣅ͍ͯΔ͕ɺτʔΫϯΛίʔϧόοΫʹࡌͤΔ QBTTXPSEˠ*%ύεϫʔυʹΑΔೝՄ SFGSFTI@UPLFOˠτʔΫϯߋ৽

Slide 26

Slide 26 text

1BTTQPSUͰ࢖͑Δ HSBOU@UZQF BVUIPSJ[BUJPO@DPEFˠೝՄίʔυϑϩʔ DMJFOU@DSFEFOUJBMT
 ˠ͍ΘΏΔʮΞϓϦέʔγϣϯೝূʯ FY5XJUUFS QBTTXPSEˠ*%ύεϫʔυʹΑΔೝՄ SFGSFTI@UPLFOˠτʔΫϯߋ৽ QFSTPOBM@BDDFTTˠݸਓ༻τʔΫϯ

Slide 27

Slide 27 text

BVUIPSJ[BUJPO@DPEF w Α͋͘ΔɺʮϓϩόΠμଆ͕ϩάΠϯը໘ɺೝՄ ը໘Λఏڙ͢ΔʯελΠϧɻ w ηΩϡϦςΟ໘Ͱ΋͜Ε͕ਪ঑ w σϑΥϧτͰ Ϣʔβʔͷ୭Ͱ΋ΫϥΠΞϯτΛ ൃߦՄೳ

Slide 28

Slide 28 text

BVUIPSJ[BUJPO@DPEF σϑΥϧτͷೝՄը໘ είʔϓແ͠ είʔϓ͋Γ

Slide 29

Slide 29 text

BVUIPSJ[BUJPO@DPEF Ϣʔβʔ͕ಛఆΛϖʔδ PBVUIBVUIPSJ[F ʹΞΫηεͤ͞Δ ˠΫΤϦͰDMJFOU@JE SFEJSFDU@VSJ SFTQPOTF@UZQFDPEF TDPQF PQUJPO TUBUF PQUJPO Λ౉͢ ˣ Ϣʔβʔ͕ϩάΠϯɺೝՄΛԡ͢ ˣ ࢦఆͨ͠ϦμΠϨΫτઌ ݩΞϓϦͷ͸ͣ ʹɺΫΤϦʹDPEFΛ ͚ͭͯϦμΠϨΫτ͞ΕΔͷͰɺ PBVUIUPLFOΛୟ͍ͯτʔΫϯΛऔಘ

Slide 30

Slide 30 text

BVUIPSJ[BUJPO@DPEF τʔΫϯऔಘͷྫ

Slide 31

Slide 31 text

QBTTXPSE w Ϣʔβʔ໊ͱύεϫʔυΛ௚઀ࢦఆͯ͠τʔΫϯ Λऔಘ͢Δ w ը໘ભҠ͕ෆཁɺϒϥ΢β͕ͳͯ͘΋ೝՄՄೳ w TDPQF<>͕࢖༻Մೳ w جຊతʹTUQBSUZͷΈ͕࢖༻Մ w ۃྗ࢖༻͢΂͖Ͱ͸ͳ͍

Slide 32

Slide 32 text

QBTTXPSE 1045ͷྫ Ϩεϙϯε͸ಉ༷ͳͷͰলུ

Slide 33

Slide 33 text

QBTTXPSEೝূ༻ ΫϥΠΞϯτΛൃߦ͢Δʹ͸ʁ BSUJTBOQBTTQPSUJOTUBMMͷࡍʹൃߦ͞ΕΔ BSUJTBOQBTTQPSUDMJFOUŠQBTTXPSEͰൃߦ ˞QBTTXPSEઐ༻ΫϥΠΞϯτͱͳΓɺ
 DPEFೝূʹ͸ར༻Ͱ͖ͳ͍

Slide 34

Slide 34 text

SFGSFTI@UPLFO w 0"VUIͷτʔΫϯ͸ηΩϡϦςΟͷͨΊɺظݶ ୹Ί͕ਪ঑ w ୅ΘΓʹSFGSFTI@UPLFOͱ͍͏ʮτʔΫϯΛߋ ৽͢ΔͨΊͷτʔΫϯʯ͕ଘࡏ w ͜ΕΛར༻ͯ͠ɺ࣮࣭൒߃ٱԽ͸Մೳ ܧ͗଍͠

Slide 35

Slide 35 text

SFGSFTI@UPLFO

Slide 36

Slide 36 text

QFSTPOBM@BDDFTT w ݸਓ༻τʔΫϯ w ظݶ͕࣮࣭Ӭٱ ߋ৽ෆཁ w ։ൃ༻τʔΫϯ΍ϫϯϥΠφʔ౳ʹ΋ศར w ΫϥΠΞϯτͷ֓೦͕ଘࡏ͠ͳ͍ಛघͳଘࡏ w ྫ͑͹-*/&/PUJGZ΋͜ΕΛ࢖ͬͯ൥Θ͍͠ೝূ ෆཁͷίʔυ͕ॻ͚ΔɺΈ͍ͨͳɻ

Slide 37

Slide 37 text

QFSTPOBM@UPLFO"1* w ૊ΈࠐΈͷ1"5औಘ"1*ɿ
 PBVUIQFSTPOBMBDDFTT UPLFOT w ϦΫΤετྫɿ
 \OBNFτʔΫϯ໊ TDPQFT<> FSSPST<>^ w ཁ8FCϩάΠϯ DTSGϔομʔ

Slide 38

Slide 38 text

QFSTPOBM@BDDFTT w ΄͔ɺVTFSDSFBUF5PLFO Ͱ΋೚ҙʹτʔΫ ϯ͕ൃߦͰ͖Δɻ

Slide 39

Slide 39 text

DMJFOU@DSFEFOUJBMT w ଞͱ͸ҧ͍ɺʮϢʔβʔʯͰ͸ͳ͘ʮΫϥΠΞ ϯτʯ ΞϓϦέʔγϣϯ Λೝূ͢Δ w Ұൠެ։ʹ͸͠ͳ͍͕ʮΞϓϦ͔ΒͳΒݟΕ ΔʯɺೝূࡁΈͳΒ3BUF-JNJU௿ݮɺͳΜ͔ʹ࢖ͬ ͨΓ 5XJUUFS w جຊతʹύϒϦοΫͳϦιʔεʹΞΫηε͢Δͨ Ίͷ΋ͷ

Slide 40

Slide 40 text

DMJFOU@DSFEFOUJBMT

Slide 41

Slide 41 text

DMJFOU@DSFEFOUJBMT ͳ͓ɺDMJFOU@DSFEFOUJBMTͷΈڐՄ͢Δ
 ϦιʔεΛͭ͘Δʹ͸ɺ
 $IFDL$MJFOU$SFEFOUJBMTϛυϧ΢ΣΞΛ
 ࢖͑͹ྑ͍ɻ

Slide 42

Slide 42 text

*OTUBMMBUJPO

Slide 43

Slide 43 text

1BTTQPSUͷΠϯετʔϧ w આ໌͢Δ΄Ͳͷ΋ͷͰ΋ͳ͍ͷͰϚχϡΞϧ͔
 ࢲͷϒϩάΛಡΜͰ͍ͩ͘͞ʂʢ w IUUQTCMPHIJOBMPFOFUUSZ QBTTQPSUMBSBWFM

Slide 44

Slide 44 text

Πϯετʔϧ͢Δͱʜʜ w ઌఔ঺հ֤ͨ͠छೝՄํ๏͕σϑΥϧτͰ༗ޮ ʹ w τʔΫϯ؅ཧपΓͷϢʔβʔ༻"1*͕༗ޮʹ
 XFC"VUIɺཁDTSG

Slide 45

Slide 45 text

ೝূ෇ϦΫΤετʜʜ w ֤ೝՄํ๏Ͱऔಘͨ͠#FBSFSτʔΫϯΛIFBEFS ʹηοτͯ͠ϦΫΤετ͢Δ͚ͩʂ w "VUIPSJ[BUJPO#FBSFSFZ+F9"J0J+,ʜʜ

Slide 46

Slide 46 text

࿈ܞɾΫϥΠΞϯτ؅ཧ
 XJUI7VFKT w τʔΫϯ΍ΫϥΠΞϯτ ͷൃߦ΍؅ཧΛߦ͏ͨΊ ͷ7VFίϯϙʔωϯτ͕ ෇ଐ

Slide 47

Slide 47 text

τʔΫϯͷਖ਼ମ w 1BTTQPSUͷ#FBSFSτʔΫϯͷ࣮ମ͸+85 +40/8FC5PLFO w Ͱ۠੾ΒΕͨCBTFFODPEFE+40/ w ͭ·Γ
 UPLFOTQMJU TMJDF 
 NBQ BUPC NBQ +40/QBSTF 
 Ͱʜʜʜʜ ͱ͜ΖͰ͍͖ͳΓ͚ͩͲ

Slide 48

Slide 48 text

ΧελϚΠζฤ

Slide 49

Slide 49 text

1BTTQPSUͷઃఆ w -BSBWFMͷύοέʔδͬͯେ఍DPOpHͰઃఆͰ͖ ΔΑ͏ʹͳͬͯΔ͔ΒͦΕฤू͢Ε͹͍͍ΑͶɺ ͱ͍͏ߟ͑͸؁͍ɻ w 1BTTQPSUʹ͸DPOpHϑΝΠϧͳΜͯ΋ͷ͸
 ͳ͔ͬͨʜʜ

Slide 50

Slide 50 text

-FWFM ʮݟͨ໨ʯͷΧελϚΠζ

Slide 51

Slide 51 text

-FWFMݟͨ໨ͷΧελϚΠζ w ೝՄը໘ͷݟͨ໨΍จݴ͸ɺ͍ͭ΋Ͳ͓Γ
 BSUJTBOWFOEPSQVCMJTIͯ͠resources/views/ vendor/passport/authorize.blade.phpΛ͍͍ײ ͡ʹͯ͠΍Ε͹͍͍ɻ w ͓ͦΒ͘ଟݴޠରԠ΋Մ

Slide 52

Slide 52 text

-FWFM τʔΫϯ؅ཧϖʔδͷ࡞੒

Slide 53

Slide 53 text

-FWFMτʔΫϯ؅ཧը໘ w طʹ7VFΛ࢖͍ͬͯΔϓϩδΣΫτͳΒਂ͘ߟ͑ ͣʹ w طʹ࢖͍ͬͯͳͯ͘΋σϑΥϧτͷBQQKT͕͋Ε ͹ w ˠOQNSVOQSPEͰ7VFʹରԠͰ͖ΔͷͰʜʜ

Slide 54

Slide 54 text

-FWFMτʔΫϯ؅ཧը໘ SFTPVSDFTBTTFUTKTBQQKTʹ
 Vue.component('authorized-clients', require('./ components/passport/AuthorizedClients.vue')); Vue.component('clients', require('./components/ passport/Clients.vue')); Vue.component('personal-tokens', require('./ components/passport/PersonalAccessTokens.vue')); Λॻ͖଍ͯ͠΍Γɺ೚ҙͷWJFXͰBVUIPSJ[FEDMJFOUTDMJFOUT QFSTPOBMUPLFOTͷΑ͏ʹॻ͍ͯ΍Ε͹͓̺ ඞཁʹԠͯ͡ίϯϙʔωϯτ΋ฤू͠·͠ΐ͏

Slide 55

Slide 55 text

-FWFM w 1BTTQPSUͷTUBUJDNFUIPEͰઃఆ

Slide 56

Slide 56 text

-FWFMTUBUJDNFUIPE w 1BTTQPSUSPVUF লུͤͣʹॻ͘ͱʜʜˠ w 1BTTQPSUSPVUF GVODUJPO 3PVUF3FHJTUSBSSPVUFS \
 SPVUFSGPS"VUIPSJ[BUJPO 
 SPVUFSGPS"DDFTT5PLFOT 
 SPVUFSGPS5SBOTJFOU5PLFOT 
 SPVUFSGPS$MJFOUT 
 SPVUFSGPS1FSTPOBM"DDFTT5PLFOT 
 ^

Slide 57

Slide 57 text

-FWFMTUBUJDNFUIPE w 1BTTQPSUQSVOF3FWPLFE5PLFOT SFWPLF࣌ʹ%#͔Βফ͢ w 1BTTQPSUQFSTPOBM"DDFTT$MJFOU DMJFOU*E w 1BTTQPSUUPLFOT$BO BSSBZTDPQFT w 1BTTQPSUUPLFOT&YQJSF*O %BUF5JNF*OUFSGBDFEBUFOVMM w 1BTTQPSUSFGSFTI5PLFOT&YQJSF*O %BUF5JNF*OUFSGBDFEBUFOVMM w 1BTTQPSUMPBE,FZT'SPN QBUI w 1BTTQPSULFZ1BUI pMF w 1BTTQPSUJHOPSF.JHSBUJPOT

Slide 58

Slide 58 text

NFNPTDPQF Passport::tokensCan([
 'read' => '౤ߘɺϓϩϑΟʔϧͷදࣔ',
 'write' => '౤ߘͷ࡞੒ɺฤू΍ϓϩϑΟʔϧͷมߋ',
 'message' => 'DirectMessageͷදࣔ',
 ]);

Slide 59

Slide 59 text

NFNPTDPQF // kernel
 'scopes' => \Laravel\Passport\Http\Middleware\CheckScopes::class,
 'scope' => \Laravel\Passport\Http\Middleware\CheckForAnyScope::class,
 // router Route::get('/orders', function () {
 // ΞΫηετʔΫϯ͸"check-status"ͱ"place-orders"ɺ྆είʔϓΛ͍࣋ͬͯΔ
 })->middleware('scopes:check-status,place-orders');
 Route::get('/orders', function () {
 // ΞΫηετʔΫϯ͸ɺ"check-status"͔"place-orders"ɺͲͪΒ͔ͷείʔϓΛ͍࣋ͬͯΔ
 })->middleware('scope:check-status,place-orders');
 Route::get('/orders', function (Request $request) {
 if ($request->user()->tokenCan('place-orders')) {
 //
 }
 });


Slide 60

Slide 60 text

-FWFM w 4FSWJDF1SPWJEFSͷΦʔόʔϥΠυ

Slide 61

Slide 61 text

-FWFMPWFSSJEF w 1BTTQPSU4FSWJDF1SPWJEFSΛܧঝͨ͠ΫϥεΛ༻ ҙ͠ɺڍಈΛมߋ͍ͨ͠෦෼ΛΦʔόʔϥΠυ w 1BTTQPSUʹݶΒͣ-BSBWFMશൠͰΑ͋͘Δ࡞ۀ w ͱΓ͋͑ͣίʔυΛಡΉ ͋·Γ΍Γͨ͘ͳ͍ w ύοέʔδͷΞοϓσʔτ಺༰ʹ஫ҙ

Slide 62

Slide 62 text

-FWFMPWFSSJEF ͨͱ͑͹ʜʜ class BearerTokenResponse extends \League\OAuth2\Server \ResponseTypes\BearerTokenResponse
 {
 protected function getExtraParams(AccessTokenEntityInterface $accessToken)
 {
 return ['scope'=>$accessToken->getScopes()];
 }
 }


Slide 63

Slide 63 text

ͳͥ࢖͏ͷ͔ɺฤ

Slide 64

Slide 64 text

8IZ1BTTQPSU w ͜Μͳঢ়گʹ͏Ε͍͠ w ද͸41" ཪ͸"1* υϝΠϯ෼཭ ˡ࣮ࡍʹӡ༻த w ϞόΠϧΞϓϦͷόοΫΤϯυͱͯ͠ ΋ "1*Λ࢖͏ɺ͋ Δ͍͸ͦΕΛݕ౼͍ͯ͠Δ w αʔυύʔςΟ͕ΫϥΠΞϯτΞϓϦΛ࡞ΕΔΑ͏ʹͨ͠ ͍ w 440͕ग़དྷΔΑ͏ʹ͍ͨ͠

Slide 65

Slide 65 text

8IZ1BTTQPSU w ͜Μͳ࢖͍ํ΋ʜʜ w +85ͷಛੑΛར༻ͯ͠ɺ"1*(BUFXBZʹߏஙͨ͠ "1*ʹτʔΫϯͷ࢖͍ճ͠ w ˠ࠷ѱ%#͕ࢮΜͰ͍ͯ΋ࣦޮݕূҎ֎Մೳ aϚΠΫϩαʔϏε

Slide 66

Slide 66 text

௕͘ͳ͚ͬͨͲ ͪΐͬͱ͚ͩσϞ

Slide 67

Slide 67 text

Ҏ্ ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ

Slide 68

Slide 68 text

ࢀߟ w -BSBWFMͰ1BTTQPSUΛࢼ͢cͽΜ͍͘Ζʹ͖ͬ w "1*ೝূ 1BTTQPSU -BSBWFM w 0"VUI4FSWFS1)1 w -BSBWFMͷ1BTTQPSUͰར༻Ͱ͖Δೝূํ๏Λ੍ݶ ͢Δ2JJUB