2013-02-22から1日間の記事一覧

アプリケーションで認証後にS3のコンテンツを返す

Rails の controller 側 class DownloadController < ApplicationController def action # 認証処理 ... resource_id = 2 resource = Resource.find resource_id response.header['X-Accel-Redirect'] = '/reproxy' response.header['X-Reproxy-URL'] = reso…

In-App Purchase

iOSアプリでアイテムを購入したときに、Appleのサーバーで購入チェックを行う。 apple が用意している、pdfを元に素直に実装すると、以下のようになる。 class AppStore STATUS_OK = 0 /** * @param[in] reveipt base64エンコードされた、レシートデータ * @…