EXVO_NOTIFICATIONS
It's gem to maintain connection between Exvo-Store and widget app (Calculator, Word Clocks, etc...)
Flow: On widget site: After user has been logged in via Exvo-Auth, his privilages (does he has access to given widget) has to be checked. If user has access than he is allowed to watch the content, if not he is redirected to Store app.
Additionally Store send request to each widget if something change with user's privilages => this gem maintain those requests (notifications_controller)
INSTALLATION & REQUIRMENTS
gem "exvo_notifications"
- Generate migration: rails g exvo_notifications
Migration add field "plan" to table User, so it has to exist in database !!
This genearator append also "not_working.html" into /public
include ExvoNotifications::Controllers::Access
it appends method check_access
this method requires current_user helper !!
- Set before filter in controller
before_filter :check_access
- Credentials / requirments:
ENV['EXVO_STORE_CLIENT_ID'] must be set (check_access require it)
protect_from_forgery should be removed