epictetus / amazon-auth-proxy Goto Github PK
View Code? Open in Web Editor NEWThis project forked from tdtds/amazon-auth-proxy
This project forked from tdtds/amazon-auth-proxy
Authentication Proxy Server of Amazon Product Advertising API. (Amazon Product Advertising APIの認証を代替するPROXYサーバ) ■amazon-auth-proxy.cgi, amazon-auth-proxy.fcgi amazon-auth-proxy.cgiは、RubyのCGIとして書かれています。従来の Amazon ECS APIとして動作し、指定した言語のAmazon PAAPIに対して 有効な認証済みリクエストを作成して呼び出し元に返します。または 実際にAPIをコールしたのち、結果をそのまま返します。 amazon-auth-proxy.fcgiはFastCGI対応版です。内部的に.cgiを呼び出 しているので、.cgiも必要です。 amazon-auth-proxy.cgiは、同じディレクトリにあるamazon-auth-proxy.yaml というファイルを読み、そこに記述されている各種APIキーとAPIのエ ントリポイント、アソシエイトIDなどを使ってAPI呼び出しを構築しま す(amazon-auth-proxy.sample.yamlを参照)。amazon-auth-proxy.yaml には公開してはいけない情報が含まれるので、.htaccessなどによって アクセスを禁止しなくてはいけません(dot.htaccess参照)。 amazon-auth-proxy.yamlで指定するentry_pointには、以下のような各 国向けAmazonのAPIエントリポイントURLを指定します: http://webservices.amazon.com/onca/xml http://webservices.amazon.co.jp/onca/xml http://webservices.amazon.fr/onca/xml http://webservices.amazon.co.uk/onca/xml http://webservices.amazon.de/onca/xml http://webservices.amazon.ca/onca/xml また、Styleパラメタを使用したクエリのため、xslt_entry_pointとし て以下のURLも指定してください: http://xml-us.amznxslt.com/onca/xml http://xml-jp.amznxslt.com/onca/xml http://xml-fr.amznxslt.com/onca/xml http://xml-uk.amznxslt.com/onca/xml http://xml-de.amznxslt.com/onca/xml http://xml-ca.amznxslt.com/onca/xml use_redirectは、通常trueにして運用してください。これは構築した AmazonへのリクエストURLを、302リダイレクトとして呼び出し元に返 すという意味です。これにより、proxyサーバの負荷を低減します。 ■amazon-auth-proxy.rb amazon-auth-proxy.cgiのSinatra版です。内部で.cgiを読み込んでい るため、.cgiも必要です。 Sinatra版は、一つのインスタンスで各国サイトに対応します。このた め、.cgiとは設定ファイルの形式が異なります。amazon-auth-proxy.sinatra.yaml をamazon-auth-proxy.yamlに変え、access_keyとsecret_key、必要に応 じてdefault_aidを書き換えて利用して下さい。 ■権利関係 Copyright (C) 2011 TADA Tadashi <[email protected]> You can redistribute it and/or modify it under GPL2. なお、module HMACは、えろぺおさんのコードを流用しています。 <http://elpeo.jp/diary/20090512.html#p01>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.