僕が日本でエンジニアとして働いていてみて思っていることと、 こうしたら良いんじゃないか?ということを書いてみます。
通常のサイトだと、secure sessionを使ったログイン認証が使われている。 スマホのネイティブアプリなどでAPIを使用する場合、sessionが使えないらしく、Oauth2のトークン認証が使われている。
sessionの場合、IDの洗い替えを意識しなくていい。
トークンの場合、アプリ側が頑張る必要が出てくる。
通常トークンとリフレッシュ用トークンの二つを発行して、 1時間以内で、リフレッシュ用トークンを使用して、通常トークンの洗い替えを行う。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 参考 | |
https://readouble.com/laravel/5.3/ja/eloquent-relationships.html | |
--- | |
drop table blogs; | |
drop table blog_comments; | |
CREATE TABLE `blogs` ( | |
`id` INT(10) UNSIGNED NOT NULL, |
まとめ記事読んで読んだ気になるもの良いですが、個人的には本を読んだほうが伝わると思います。 また、読んだ時の実力で、本の内容が変わるらしいので、そういう意味でも自分で読まないといけないと思います。 (amazonのレビュー見ていると人それぞれのレベルで読んでいることが垣間見れると思います。)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function aaa_dl(uri, filename) { | |
filename = filename || 'file'; | |
var link = document.createElement('a'); | |
link.download = filename; | |
link.href = uri; | |
link.click(); | |
} | |
var preStr = 'http://example.com/gazou'; | |
var sleepNum = 2000; // アクセス間隔を2秒ごとにする。 |