Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/salesking/sk_app_examples
SalesKing oAuth Example Apps
https://github.com/salesking/sk_app_examples
Last synced: about 2 months ago
JSON representation
SalesKing oAuth Example Apps
- Host: GitHub
- URL: https://github.com/salesking/sk_app_examples
- Owner: salesking
- Created: 2011-02-11T23:56:24.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-12-13T18:26:07.000Z (about 12 years ago)
- Last Synced: 2024-03-25T23:09:33.972Z (9 months ago)
- Language: Ruby
- Homepage: https://www.salesking.eu
- Size: 203 KB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- Changelog: CHANGELOG.rdoc
Awesome Lists containing this project
README
= SalesKing App Examples
SalesKing can be connected and enhanced using the API and Apps. Our Apps are
using oAuth2 for authentication and authorization, like you may know it from
facebook.
When registering your app in SalesKing you get credentials(app id + secret) needed
to identify your app and establish a trusted connection.== Examples
Before you start coding:
* register your app in your SalesKing account ../developers/apps
* grab a shiny new pair of app key & secretDepending on the example our are using, Provide the right url's(app and canvas )
in the registration form and then edit the apps settings(inline) or the
settings.yml file.== PHP plain
https://github.com/salesking/sk_app_examples/blob/master/php/plain_oauth.php
Completely stripped down example, visualizing:
* user authentication
* app authorization
* app authenticationOne page does it all, no caching or saving of access token or user information,
so definitely NOT something you want to use in production.== Ruby
The ruby examples impose some dependencies:
* Sinatra: as webserver lifting the scripts into your browser
* Curb(Curl): making the web requests, especially HTTPS without hassleMost apps use bundler to prevent the gem-hassle and can be racked-up.
Sinatra, by default, starts on port 4567, so you should use the following url when
registering your app: http ://localhost:4567=== Plain login
This is the same as the plain php example, a single view handling the triple-oAuth2
jump.
https://github.com/salesking/sk_app_examples/blob/master/ruby/sinatra_plain/example.rb=== Advanced login
The app saves login information(access_token) encrypted in a cookie. It also
demonstrates how to deal with dynamic SalesKing URL's(Subdomain for each account).https://github.com/salesking/sk_app_examples/tree/master/ruby/sinatra_adv
=== Push Notifications / PubSub
An app showing how to register for push notifications(WebHooks/PubSub) and how
to deal with the callback resultshttps://github.com/salesking/sk_app_examples/tree/master/ruby/sinatra_pubsub
=== Payment chart
Show payment or invoice stats in a zoomable chart.
https://github.com/salesking/sk_app_examples/tree/master/ruby/sinatra_stats