README.md in xeroizer-2.15.5 vs README.md in xeroizer-2.15.6
- old
+ new
@@ -110,14 +110,14 @@
session[:request_secret],
:oauth_verifier => params[:oauth_verifier] )
session[:xero_auth] = {
:access_token => @xero_client.access_token.token,
- :access_key => @xero_client.access_token.key }
+ :access_key => @xero_client.access_token.secret }
- session.data.delete(:request_token)
- session.data.delete(:request_secret)
+ session[:request_token] = nil
+ session[:request_secret] = nil
end
def destroy
session.data.delete(:xero_auth)
end
@@ -547,9 +547,20 @@
client = Xeroizer::PublicApplication.new(YOUR_OAUTH_CONSUMER_KEY,
YOUR_OAUTH_CONSUMER_SECRET,
:rate_limit_sleep => 2)
```
+Logging
+---------------
+
+You can add an optional paramater to the Xeroizer Application initialization, to pass a logger object that will need to respond_to :info. For example, in a rails app:
+
+```ruby
+XeroLogger = Logger.new('log/xero.log', 'weekly')
+client = Xeroizer::PublicApplication.new(YOUR_OAUTH_CONSUMER_KEY,
+ YOUR_OAUTH_CONSUMER_SECRET,
+ :logger => XeroLogger)
+```
### Contributors
Xeroizer was inspired by the https://github.com/tlconnor/xero_gateway gem created by Tim Connor
and Nik Wakelin and portions of the networking and authentication code are based completely off
this project. Copyright for these components remains held in the name of Tim Connor.