platform 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -0
- data/.rspec +2 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +191 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +5 -0
- data/Rakefile +37 -0
- data/app/assets/images/platform/.gitkeep +0 -0
- data/app/assets/images/platform/accept.png +0 -0
- data/app/assets/images/platform/action_tab_bkgd.gif +0 -0
- data/app/assets/images/platform/action_tab_white_bkgd.gif +0 -0
- data/app/assets/images/platform/add.png +0 -0
- data/app/assets/images/platform/apps/app_icon.gif +0 -0
- data/app/assets/images/platform/apps/app_logo.gif +0 -0
- data/app/assets/images/platform/arrow_down.gif +0 -0
- data/app/assets/images/platform/arrow_down.png +0 -0
- data/app/assets/images/platform/arrow_down_grey.png +0 -0
- data/app/assets/images/platform/arrow_right.gif +0 -0
- data/app/assets/images/platform/arrow_up.png +0 -0
- data/app/assets/images/platform/arrow_up_grey.png +0 -0
- data/app/assets/images/platform/bullet_go.png +0 -0
- data/app/assets/images/platform/buttons.png +0 -0
- data/app/assets/images/platform/cancel.png +0 -0
- data/app/assets/images/platform/clipboard_icon.gif +0 -0
- data/app/assets/images/platform/close.gif +0 -0
- data/app/assets/images/platform/cross.png +0 -0
- data/app/assets/images/platform/default_app_icon.gif +0 -0
- data/app/assets/images/platform/default_app_logo.gif +0 -0
- data/app/assets/images/platform/delete.png +0 -0
- data/app/assets/images/platform/disk.png +0 -0
- data/app/assets/images/platform/exclamation.png +0 -0
- data/app/assets/images/platform/eye.png +0 -0
- data/app/assets/images/platform/eye_not.png +0 -0
- data/app/assets/images/platform/field_sprite.gif +0 -0
- data/app/assets/images/platform/find.png +0 -0
- data/app/assets/images/platform/globe.gif +0 -0
- data/app/assets/images/platform/help.png +0 -0
- data/app/assets/images/platform/help/app_reg.png +0 -0
- data/app/assets/images/platform/help/app_reg_ext.png +0 -0
- data/app/assets/images/platform/help/app_reg_web.png +0 -0
- data/app/assets/images/platform/help/auth_desktop.png +0 -0
- data/app/assets/images/platform/help/auth_iframe.png +0 -0
- data/app/assets/images/platform/help/auth_iphone.png +0 -0
- data/app/assets/images/platform/help/auth_web.png +0 -0
- data/app/assets/images/platform/help/authorize.png +0 -0
- data/app/assets/images/platform/help/ext.png +0 -0
- data/app/assets/images/platform/help/login.png +0 -0
- data/app/assets/images/platform/help/login_desktop.png +0 -0
- data/app/assets/images/platform/help/login_iphone.png +0 -0
- data/app/assets/images/platform/help/login_web.png +0 -0
- data/app/assets/images/platform/help2.png +0 -0
- data/app/assets/images/platform/information.png +0 -0
- data/app/assets/images/platform/keyboard.png +0 -0
- data/app/assets/images/platform/language_selector_arrow.gif +0 -0
- data/app/assets/images/platform/left_quote.png +0 -0
- data/app/assets/images/platform/lightning.png +0 -0
- data/app/assets/images/platform/loading.gif +0 -0
- data/app/assets/images/platform/loading2.gif +0 -0
- data/app/assets/images/platform/loading3.gif +0 -0
- data/app/assets/images/platform/loading_animation.gif +0 -0
- data/app/assets/images/platform/loading_large.gif +0 -0
- data/app/assets/images/platform/lock.png +0 -0
- data/app/assets/images/platform/lock_add.png +0 -0
- data/app/assets/images/platform/lock_delete.png +0 -0
- data/app/assets/images/platform/lock_open.png +0 -0
- data/app/assets/images/platform/medals/bronze.png +0 -0
- data/app/assets/images/platform/medals/gold.png +0 -0
- data/app/assets/images/platform/medals/runner.png +0 -0
- data/app/assets/images/platform/medals/silver.png +0 -0
- data/app/assets/images/platform/minus_node.png +0 -0
- data/app/assets/images/platform/oauth/perm_tile.gif +0 -0
- data/app/assets/images/platform/oauth/right_grey.png +0 -0
- data/app/assets/images/platform/pencil.png +0 -0
- data/app/assets/images/platform/photo_silhouette.gif +0 -0
- data/app/assets/images/platform/pixel.gif +0 -0
- data/app/assets/images/platform/platform.png +0 -0
- data/app/assets/images/platform/platform2.png +0 -0
- data/app/assets/images/platform/platform3.png +0 -0
- data/app/assets/images/platform/platform4.png +0 -0
- data/app/assets/images/platform/platform5.png +0 -0
- data/app/assets/images/platform/plus.png +0 -0
- data/app/assets/images/platform/plus_node.png +0 -0
- data/app/assets/images/platform/random.png +0 -0
- data/app/assets/images/platform/random2.png +0 -0
- data/app/assets/images/platform/rating_star0.png +0 -0
- data/app/assets/images/platform/rating_star05.png +0 -0
- data/app/assets/images/platform/rating_star1.png +0 -0
- data/app/assets/images/platform/rating_stars.gif +0 -0
- data/app/assets/images/platform/rating_stars.psd +0 -0
- data/app/assets/images/platform/reply.png +0 -0
- data/app/assets/images/platform/right_quote.png +0 -0
- data/app/assets/images/platform/rotating_world.gif +0 -0
- data/app/assets/images/platform/script.png +0 -0
- data/app/assets/images/platform/script_edit.png +0 -0
- data/app/assets/images/platform/script_gear.png +0 -0
- data/app/assets/images/platform/site_sprite.gif +0 -0
- data/app/assets/images/platform/spinner.gif +0 -0
- data/app/assets/images/platform/star.png +0 -0
- data/app/assets/images/platform/table_edit.png +0 -0
- data/app/assets/images/platform/table_gear.png +0 -0
- data/app/assets/images/platform/table_multiple.png +0 -0
- data/app/assets/images/platform/thumb_down.png +0 -0
- data/app/assets/images/platform/thumb_up.png +0 -0
- data/app/assets/images/platform/top_left_stem.png +0 -0
- data/app/assets/images/platform/top_right_stem.png +0 -0
- data/app/assets/images/platform/translate_icn.gif +0 -0
- data/app/assets/images/platform/treeview/diffDoc.gif +0 -0
- data/app/assets/images/platform/treeview/diffFolder.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2blank.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2doc.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2folderclosed.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2folderopen.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2lastnode.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2link.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2mlastnode.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2mnode.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2node.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2plastnode.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2pnode.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2vertline.gif +0 -0
- data/app/assets/images/platform/wizard.png +0 -0
- data/app/assets/images/platform/world_link.png +0 -0
- data/app/assets/javascripts/platform/api_explorer.js +628 -0
- data/app/assets/javascripts/platform/application.js +9 -0
- data/app/assets/javascripts/platform/ftiens4.js +1197 -0
- data/app/assets/javascripts/platform/jsdk.js +539 -0
- data/app/assets/javascripts/platform/platform.js +447 -0
- data/app/assets/javascripts/platform/shortcut.js +223 -0
- data/app/assets/javascripts/platform/ua.js +147 -0
- data/app/assets/stylesheets/platform/api_explorer.css.scss +140 -0
- data/app/assets/stylesheets/platform/application.css.scss +6 -0
- data/app/assets/stylesheets/platform/components.css.scss +208 -0
- data/app/assets/stylesheets/platform/layout.css.scss +119 -0
- data/app/assets/stylesheets/platform/oauth.css +51 -0
- data/app/assets/stylesheets/platform/platform.css.scss +311 -0
- data/app/controllers/platform/admin/apps_controller.rb +99 -0
- data/app/controllers/platform/admin/base_controller.rb +60 -0
- data/app/controllers/platform/admin/categories_controller.rb +132 -0
- data/app/controllers/platform/admin/clientsdk_controller.rb +30 -0
- data/app/controllers/platform/admin/developers_controller.rb +30 -0
- data/app/controllers/platform/admin/exceptions_controller.rb +30 -0
- data/app/controllers/platform/admin/forum_controller.rb +34 -0
- data/app/controllers/platform/admin/metrics_controller.rb +42 -0
- data/app/controllers/platform/api/apps_controller.rb +40 -0
- data/app/controllers/platform/api/base_controller.rb +541 -0
- data/app/controllers/platform/apps_controller.rb +142 -0
- data/app/controllers/platform/base_controller.rb +127 -0
- data/app/controllers/platform/developer/api_explorer_controller.rb +56 -0
- data/app/controllers/platform/developer/apps_controller.rb +161 -0
- data/app/controllers/platform/developer/base_controller.rb +51 -0
- data/app/controllers/platform/developer/blog_controller.rb +29 -0
- data/app/controllers/platform/developer/dashboard_controller.rb +63 -0
- data/app/controllers/platform/developer/forum_controller.rb +85 -0
- data/app/controllers/platform/developer/help_controller.rb +113 -0
- data/app/controllers/platform/developer/info_controller.rb +41 -0
- data/app/controllers/platform/developer/registration_controller.rb +39 -0
- data/app/controllers/platform/developer/resources_controller.rb +30 -0
- data/app/controllers/platform/forum_controller.rb +74 -0
- data/app/controllers/platform/oauth_controller.rb +421 -0
- data/app/controllers/platform/ratings_controller.rb +61 -0
- data/app/helpers/platform/admin/categories_helper.rb +54 -0
- data/app/helpers/platform/apps_helper.rb +26 -0
- data/app/helpers/platform/developer/dashboard_helper.rb +42 -0
- data/app/helpers/platform/developer/help_helper.rb +45 -0
- data/app/helpers/platform_helper.rb +26 -0
- data/app/models/platform/application.rb +394 -0
- data/app/models/platform/application_category.rb +34 -0
- data/app/models/platform/application_developer.rb +30 -0
- data/app/models/platform/application_filter.rb +30 -0
- data/app/models/platform/application_log.rb +32 -0
- data/app/models/platform/application_log_filter.rb +34 -0
- data/app/models/platform/application_metric.rb +58 -0
- data/app/models/platform/application_metric_filter.rb +34 -0
- data/app/models/platform/application_permission.rb +30 -0
- data/app/models/platform/application_permission_filter.rb +30 -0
- data/app/models/platform/application_usage_metric.rb +58 -0
- data/app/models/platform/application_usage_metric_filter.rb +34 -0
- data/app/models/platform/application_user.rb +45 -0
- data/app/models/platform/application_user_filter.rb +34 -0
- data/app/models/platform/base_filter.rb +46 -0
- data/app/models/platform/category.rb +64 -0
- data/app/models/platform/daily_application_metric.rb +31 -0
- data/app/models/platform/developer.rb +45 -0
- data/app/models/platform/developer_filter.rb +26 -0
- data/app/models/platform/forum_message.rb +35 -0
- data/app/models/platform/forum_message_filter.rb +26 -0
- data/app/models/platform/forum_topic.rb +38 -0
- data/app/models/platform/forum_topic_filter.rb +26 -0
- data/app/models/platform/logged_exception.rb +290 -0
- data/app/models/platform/logged_exception_filter.rb +58 -0
- data/app/models/platform/media/image.rb +26 -0
- data/app/models/platform/media/media.rb +58 -0
- data/app/models/platform/monthly_application_metric.rb +31 -0
- data/app/models/platform/oauth/access_token.rb +57 -0
- data/app/models/platform/oauth/client_token.rb +38 -0
- data/app/models/platform/oauth/oauth_model_methods.rb +41 -0
- data/app/models/platform/oauth/oauth_token.rb +57 -0
- data/app/models/platform/oauth/oauth_token_filter.rb +34 -0
- data/app/models/platform/oauth/refresh_token.rb +47 -0
- data/app/models/platform/oauth/request_token.rb +50 -0
- data/app/models/platform/permission.rb +27 -0
- data/app/models/platform/rating.rb +43 -0
- data/app/models/platform/rating_filter.rb +30 -0
- data/app/models/platform/rollup_log.rb +27 -0
- data/app/models/platform/rollup_log_filter.rb +30 -0
- data/app/models/platform/total_application_metric.rb +40 -0
- data/app/models/platform/weekly_application_metric.rb +31 -0
- data/app/views/platform/admin/apps/_categories.html.erb +17 -0
- data/app/views/platform/admin/apps/_categories_scripts.html.erb +17 -0
- data/app/views/platform/admin/apps/_tabs.html.erb +25 -0
- data/app/views/platform/admin/apps/index.html.erb +32 -0
- data/app/views/platform/admin/apps/permissions.html.erb +7 -0
- data/app/views/platform/admin/apps/ratings.html.erb +7 -0
- data/app/views/platform/admin/apps/tokens.html.erb +18 -0
- data/app/views/platform/admin/apps/users.html.erb +7 -0
- data/app/views/platform/admin/apps/view.html.erb +170 -0
- data/app/views/platform/admin/categories/_tabs.html.erb +22 -0
- data/app/views/platform/admin/categories/category_assigner.html.erb +9 -0
- data/app/views/platform/admin/categories/category_assigner_tree.html.erb +81 -0
- data/app/views/platform/admin/categories/index.html.erb +106 -0
- data/app/views/platform/admin/categories/items.html.erb +153 -0
- data/app/views/platform/admin/categories/lb_update_application_category.html.erb +54 -0
- data/app/views/platform/admin/categories/lb_update_category.html.erb +64 -0
- data/app/views/platform/admin/categories/tree.html.erb +64 -0
- data/app/views/platform/admin/clientsdk/index.html.erb +89 -0
- data/app/views/platform/admin/common/_footer.html.erb +1 -0
- data/app/views/platform/admin/common/_header.html.erb +32 -0
- data/app/views/platform/admin/common/_lightbox_buttons.html.erb +5 -0
- data/app/views/platform/admin/common/_paginator.html.erb +20 -0
- data/app/views/platform/admin/developers/_tabs.html.erb +22 -0
- data/app/views/platform/admin/developers/index.html.erb +7 -0
- data/app/views/platform/admin/exceptions/_tabs.html.erb +22 -0
- data/app/views/platform/admin/exceptions/index.html.erb +7 -0
- data/app/views/platform/admin/forum/_tabs.html.erb +22 -0
- data/app/views/platform/admin/forum/index.html.erb +7 -0
- data/app/views/platform/admin/forum/messages.html.erb +7 -0
- data/app/views/platform/admin/metrics/_tabs.html.erb +25 -0
- data/app/views/platform/admin/metrics/application_log.html.erb +7 -0
- data/app/views/platform/admin/metrics/index.html.erb +9 -0
- data/app/views/platform/admin/metrics/rollup_log.html.erb +7 -0
- data/app/views/platform/admin/metrics/usage.html.erb +7 -0
- data/app/views/platform/apps/_actions_module.html.erb +3 -0
- data/app/views/platform/apps/_app_footer.html.erb +8 -0
- data/app/views/platform/apps/_app_header.html.erb +25 -0
- data/app/views/platform/apps/_apps_module.html.erb +42 -0
- data/app/views/platform/apps/_authorize_form.html.erb +11 -0
- data/app/views/platform/apps/_categories_module.html.erb +11 -0
- data/app/views/platform/apps/_featured_apps_module.html.erb +40 -0
- data/app/views/platform/apps/_left.html.erb +20 -0
- data/app/views/platform/apps/_monthly_users_module.html.erb +8 -0
- data/app/views/platform/apps/_paginator.html.erb +13 -0
- data/app/views/platform/apps/_rank_module.html.erb +18 -0
- data/app/views/platform/apps/_search_apps_module.html.erb +35 -0
- data/app/views/platform/apps/canvas_app.html.erb +15 -0
- data/app/views/platform/apps/index.html.erb +86 -0
- data/app/views/platform/apps/view.html.erb +71 -0
- data/app/views/platform/apps/xd.html.erb +11 -0
- data/app/views/platform/common/_footer.html.erb +1 -0
- data/app/views/platform/common/_header.html.erb +4 -0
- data/app/views/platform/common/_paginator.html.erb +32 -0
- data/app/views/platform/common/_scripts.html.erb +7 -0
- data/app/views/platform/common/_user_login.html.erb +11 -0
- data/app/views/platform/developer/api_explorer/history.html.erb +31 -0
- data/app/views/platform/developer/api_explorer/index.html.erb +134 -0
- data/app/views/platform/developer/api_explorer/oauth_lander.html.erb +4 -0
- data/app/views/platform/developer/api_explorer/options.html.erb +44 -0
- data/app/views/platform/developer/apps/_form.html.erb +340 -0
- data/app/views/platform/developer/apps/create_version.html.erb +19 -0
- data/app/views/platform/developer/apps/edit.html.erb +21 -0
- data/app/views/platform/developer/apps/index.html.erb +375 -0
- data/app/views/platform/developer/apps/new.html.erb +20 -0
- data/app/views/platform/developer/blog/index.html.erb +7 -0
- data/app/views/platform/developer/common/_footer.html.erb +1 -0
- data/app/views/platform/developer/common/_header.html.erb +34 -0
- data/app/views/platform/developer/dashboard/_apps_info.html.erb +84 -0
- data/app/views/platform/developer/dashboard/_discussions.html.erb +68 -0
- data/app/views/platform/developer/dashboard/_header.html.erb +12 -0
- data/app/views/platform/developer/dashboard/_reviews.html.erb +53 -0
- data/app/views/platform/developer/dashboard/_statistics.html.erb +105 -0
- data/app/views/platform/developer/dashboard/index.html.erb +85 -0
- data/app/views/platform/developer/dashboard/settings.html.erb +23 -0
- data/app/views/platform/developer/forum/_message.html.erb +17 -0
- data/app/views/platform/developer/forum/_messages.html.erb +14 -0
- data/app/views/platform/developer/forum/_new_message.html.erb +28 -0
- data/app/views/platform/developer/forum/_new_topic.html.erb +39 -0
- data/app/views/platform/developer/forum/index.html.erb +89 -0
- data/app/views/platform/developer/forum/topic.html.erb +28 -0
- data/app/views/platform/developer/help/_footer.html.erb +4 -0
- data/app/views/platform/developer/help/_header.html.erb +95 -0
- data/app/views/platform/developer/help/_navigation.html.erb +99 -0
- data/app/views/platform/developer/help/api.html.erb +120 -0
- data/app/views/platform/developer/help/credits.html.erb +77 -0
- data/app/views/platform/developer/help/index.html.erb +19 -0
- data/app/views/platform/developer/help/license.html.erb +586 -0
- data/app/views/platform/developer/help/oauth_app_login.html.erb +177 -0
- data/app/views/platform/developer/help/oauth_client_side.html.erb +264 -0
- data/app/views/platform/developer/help/oauth_desktop.html.erb +191 -0
- data/app/views/platform/developer/help/oauth_extensions.html.erb +342 -0
- data/app/views/platform/developer/help/oauth_intro.html.erb +371 -0
- data/app/views/platform/developer/help/oauth_mobile.html.erb +292 -0
- data/app/views/platform/developer/help/oauth_server_side.html.erb +603 -0
- data/app/views/platform/developer/help/oauth_trusted_client.html.erb +202 -0
- data/app/views/platform/developer/help/reference.html.erb +42 -0
- data/app/views/platform/developer/help/sdk_ios.html.erb +31 -0
- data/app/views/platform/developer/help/sdk_js.html.erb +202 -0
- data/app/views/platform/developer/info/_basic_info.html.erb +74 -0
- data/app/views/platform/developer/info/_header.html.erb +12 -0
- data/app/views/platform/developer/info/index.html.erb +23 -0
- data/app/views/platform/developer/registration/index.html.erb +134 -0
- data/app/views/platform/developer/resources/index.html.erb +23 -0
- data/app/views/platform/forum/_message.html.erb +17 -0
- data/app/views/platform/forum/_messages.html.erb +14 -0
- data/app/views/platform/forum/_new_message.html.erb +26 -0
- data/app/views/platform/forum/_new_topic.html.erb +38 -0
- data/app/views/platform/forum/_topic.html.erb +18 -0
- data/app/views/platform/forum/_topics.html.erb +74 -0
- data/app/views/platform/login/index.html.erb +31 -0
- data/app/views/platform/login/register.html.erb +55 -0
- data/app/views/platform/oauth/_authorization_box.html.erb +75 -0
- data/app/views/platform/oauth/_authorization_popup.html.erb +38 -0
- data/app/views/platform/oauth/_authorize_form.html.erb +11 -0
- data/app/views/platform/oauth/auth_failed.html.erb +0 -0
- data/app/views/platform/oauth/auth_success.html.erb +0 -0
- data/app/views/platform/oauth/authorize_desktop.html.erb +76 -0
- data/app/views/platform/oauth/authorize_failure_iframe.html.erb +1 -0
- data/app/views/platform/oauth/authorize_failure_mobile.html.erb +24 -0
- data/app/views/platform/oauth/authorize_failure_popup.html.erb +24 -0
- data/app/views/platform/oauth/authorize_failure_web.html.erb +1 -0
- data/app/views/platform/oauth/authorize_iframe.html.erb +16 -0
- data/app/views/platform/oauth/authorize_mobile.html.erb +1 -0
- data/app/views/platform/oauth/authorize_popup.html.erb +1 -0
- data/app/views/platform/oauth/authorize_success_iframe.html.erb +1 -0
- data/app/views/platform/oauth/authorize_success_mobile.html.erb +24 -0
- data/app/views/platform/oauth/authorize_success_popup.html.erb +24 -0
- data/app/views/platform/oauth/authorize_success_web.html.erb +1 -0
- data/app/views/platform/oauth/authorize_web.html.erb +3 -0
- data/app/views/platform/oauth/xd.html.erb +13 -0
- data/app/views/platform/ratings/_list.html.erb +30 -0
- data/app/views/platform/ratings/_new.html.erb +70 -0
- data/app/views/platform/ratings/_rating.html.erb +17 -0
- data/config/platform/config.yml +133 -0
- data/config/platform/data/default_applications.yml +39 -0
- data/config/platform/data/default_categories.yml +56 -0
- data/config/platform/data/default_permissions.yml +0 -0
- data/config/platform/site/features.yml +66 -0
- data/config/routes.rb +59 -0
- data/db/migrate/20110602232141_create_platform_tables.rb +262 -0
- data/docs/Classes.graffle +7315 -0
- data/docs/Classes.pdf +0 -0
- data/lib/generators/platform/platform_generator.rb +56 -0
- data/lib/generators/platform/templates/db/create_platform_tables.rb +262 -0
- data/lib/generators/platform/templates/layouts/platform.html.erb +49 -0
- data/lib/generators/platform/templates/layouts/platform_admin.html.erb +60 -0
- data/lib/platform.rb +6 -0
- data/lib/platform/api/already_jsoned_string.rb +9 -0
- data/lib/platform/api/proxy.rb +45 -0
- data/lib/platform/api/proxy/base.rb +62 -0
- data/lib/platform/cache.rb +78 -0
- data/lib/platform/config.rb +666 -0
- data/lib/platform/engine.rb +5 -0
- data/lib/platform/exception.rb +27 -0
- data/lib/platform/extensions/action_controller_extension.rb +65 -0
- data/lib/platform/extensions/action_view_extension.rb +168 -0
- data/lib/platform/extensions/object_extension.rb +51 -0
- data/lib/platform/helper.rb +33 -0
- data/lib/platform/logger.rb +62 -0
- data/lib/platform/railtie.rb +52 -0
- data/lib/platform/random_password_generator.rb +76 -0
- data/lib/platform/simple_string_permissions.rb +40 -0
- data/lib/platform/version.rb +3 -0
- data/lib/tasks/platform.rake +119 -0
- data/platform.gemspec +45 -0
- data/script/rails +6 -0
- data/spec/config/config_spec.rb +10 -0
- data/spec/dummy_app.rb +52 -0
- data/spec/models/application_spec.rb +53 -0
- data/spec/models/developer_spec.rb +23 -0
- data/spec/spec_helper.rb +29 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +7 -0
- data/test/dummy/app/assets/stylesheets/admin.css +200 -0
- data/test/dummy/app/assets/stylesheets/application.css +47 -0
- data/test/dummy/app/assets/stylesheets/components.css.scss +211 -0
- data/test/dummy/app/assets/stylesheets/layout.css.scss +143 -0
- data/test/dummy/app/controllers/admin/admins_controller.rb +7 -0
- data/test/dummy/app/controllers/admin/base_controller.rb +12 -0
- data/test/dummy/app/controllers/admin/bookmarks_controller.rb +7 -0
- data/test/dummy/app/controllers/admin/users_controller.rb +19 -0
- data/test/dummy/app/controllers/api/base_controller.rb +5 -0
- data/test/dummy/app/controllers/api/bookmarks_controller.rb +35 -0
- data/test/dummy/app/controllers/api/users_controller.rb +19 -0
- data/test/dummy/app/controllers/application_controller.rb +31 -0
- data/test/dummy/app/controllers/home_controller.rb +7 -0
- data/test/dummy/app/controllers/login_controller.rb +65 -0
- data/test/dummy/app/helpers/application_helper.rb +9 -0
- data/test/dummy/app/helpers/home_helper.rb +2 -0
- data/test/dummy/app/mailers/.gitkeep +0 -0
- data/test/dummy/app/models/.gitkeep +0 -0
- data/test/dummy/app/models/admin.rb +4 -0
- data/test/dummy/app/models/admin_filter.rb +7 -0
- data/test/dummy/app/models/bookmark.rb +7 -0
- data/test/dummy/app/models/user.rb +34 -0
- data/test/dummy/app/views/admin/admins/index.html.erb +7 -0
- data/test/dummy/app/views/admin/bookmarks/index.html.erb +5 -0
- data/test/dummy/app/views/admin/users/index.html.erb +10 -0
- data/test/dummy/app/views/demo/index.rhtml +108 -0
- data/test/dummy/app/views/demo/tokens.rhtml +35 -0
- data/test/dummy/app/views/home/index.html.erb +43 -0
- data/test/dummy/app/views/layouts/_footer.html.erb +16 -0
- data/test/dummy/app/views/layouts/_header.html.erb +22 -0
- data/test/dummy/app/views/layouts/admin.html.erb +97 -0
- data/test/dummy/app/views/layouts/application.html.erb +25 -0
- data/test/dummy/app/views/layouts/minimal.html.erb +37 -0
- data/test/dummy/app/views/layouts/popup.html.erb +43 -0
- data/test/dummy/app/views/login/index.html.erb +34 -0
- data/test/dummy/app/views/login/register.html.erb +51 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +51 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +30 -0
- data/test/dummy/config/environments/production.rb +60 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/platform/api/0/bookmark.yml +18 -0
- data/test/dummy/config/platform/api/0/user.yml +17 -0
- data/test/dummy/config/platform/api/1/bookmark.yml +58 -0
- data/test/dummy/config/platform/api/1/user.yml +36 -0
- data/test/dummy/config/platform/config.yml +135 -0
- data/test/dummy/config/platform/data/default_applications.yml +39 -0
- data/test/dummy/config/platform/data/default_categories.yml +56 -0
- data/test/dummy/config/platform/data/default_permissions.yml +0 -0
- data/test/dummy/config/platform/site/features.yml +66 -0
- data/test/dummy/config/platform/site/sample_apps.yml +100 -0
- data/test/dummy/config/routes.rb +30 -0
- data/test/dummy/config/tr8n/config.yml +247 -0
- data/test/dummy/config/tr8n/data/ip_locations.csv +93460 -0
- data/test/dummy/config/tr8n/rules/default_date_rules.yml +20 -0
- data/test/dummy/config/tr8n/rules/default_gender_list_rules.yml +82 -0
- data/test/dummy/config/tr8n/rules/default_gender_rules.yml +20 -0
- data/test/dummy/config/tr8n/rules/default_language_cases.yml +272 -0
- data/test/dummy/config/tr8n/rules/default_list_rules.yml +19 -0
- data/test/dummy/config/tr8n/rules/default_numeric_rules.yml +42 -0
- data/test/dummy/config/tr8n/rules/default_value_rules.yml +18 -0
- data/test/dummy/config/tr8n/site/default_glossary.yml +18 -0
- data/test/dummy/config/tr8n/site/default_languages.yml +1591 -0
- data/test/dummy/config/tr8n/site/features.yml +111 -0
- data/test/dummy/config/tr8n/site/shortcuts.yml +55 -0
- data/test/dummy/config/tr8n/site/sitemap.json +42 -0
- data/test/dummy/config/tr8n/tokens/data.yml +19 -0
- data/test/dummy/config/tr8n/tokens/decorations.yml +19 -0
- data/test/dummy/config/will_filter/config.yml +99 -0
- data/test/dummy/db/migrate/20101207014543_create_users.rb +23 -0
- data/test/dummy/db/migrate/20110113223509_create_admins.rb +15 -0
- data/test/dummy/db/migrate/20110930041143_create_will_filter_filters.rb +15 -0
- data/test/dummy/db/migrate/20110930041150_create_tr8n_tables.rb +350 -0
- data/test/dummy/db/migrate/20111004075531_create_platform_tables.rb +262 -0
- data/test/dummy/db/migrate/20111012055603_create_bookmarks.rb +10 -0
- data/test/dummy/db/schema.rb +683 -0
- data/test/dummy/lib/assets/.gitkeep +0 -0
- data/test/dummy/lib/platform/api/bookmark_proxy_0.rb +12 -0
- data/test/dummy/lib/platform/api/bookmark_proxy_1.rb +12 -0
- data/test/dummy/lib/platform/api/user_proxy_0.rb +12 -0
- data/test/dummy/lib/platform/api/user_proxy_1.rb +12 -0
- data/test/dummy/log/.gitkeep +0 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/fixtures/documents.yml +11 -0
- data/test/dummy/test/unit/document_test.rb +7 -0
- metadata +886 -0
@@ -0,0 +1,342 @@
|
|
1
|
+
<%= render :partial => "header" %>
|
2
|
+
<div class="documentation_section_title">
|
3
|
+
<%= tr("{site_title} Extensions", "", :site_title => Platform::Config.site_title) %>
|
4
|
+
</div>
|
5
|
+
<div class="documentation_section">
|
6
|
+
<p>
|
7
|
+
<%=tr("{site_title} Platform provides a mechanism for creating your own embedded applications (extensions) for the site.", "", :site_title => Platform::Config.site_title) %>
|
8
|
+
<%=tr("{site_title} extensions are applications that are launched inside of an iframe on the site.", "", :site_title => Platform::Config.site_title) %>
|
9
|
+
</p>
|
10
|
+
<p>
|
11
|
+
<%=tr("This document provides you with steps for creating your own extension and embed it into the site.")%>
|
12
|
+
</p>
|
13
|
+
<h3><%=tr("Embedded Application Example") %></h3>
|
14
|
+
<p>
|
15
|
+
<%=tr("Below is an example of a Photo Gallery extension that loads user's photo albums and displays them using an interactive layout.")%>
|
16
|
+
<%=tr("The embedded application is running inside of an iFrame and is served by a server outside of {site_title}.", "", :site_title => Platform::Config.site_title)%>
|
17
|
+
</p>
|
18
|
+
<p style="text-align:center">
|
19
|
+
<%=image_tag("platform/help/ext.png", :style=>"width:600px;", :class => "screenshot") %>
|
20
|
+
</p>
|
21
|
+
<h2><%=tr("Embedded Application Registration") %></h2>
|
22
|
+
<p>
|
23
|
+
<%=tr("In order to create an embedded application, you have to provide the following information:")%>
|
24
|
+
</p>
|
25
|
+
<p style="text-align:center">
|
26
|
+
<%=image_tag("platform/help/app_reg_ext.png", :style=>"width:600px;", :class => "screenshot") %>
|
27
|
+
</p>
|
28
|
+
|
29
|
+
<h3><%=tr("Application Fields") %></h3>
|
30
|
+
<p>
|
31
|
+
<table class="documentation_table">
|
32
|
+
<tr>
|
33
|
+
<th style="width:150px;">
|
34
|
+
<%=tr("Name") %>
|
35
|
+
</th>
|
36
|
+
<th>
|
37
|
+
<%=tr("Description") %>
|
38
|
+
</th>
|
39
|
+
<th style="width:100px;">
|
40
|
+
<%=tr("Required") %>
|
41
|
+
</th>
|
42
|
+
</tr>
|
43
|
+
<tr>
|
44
|
+
<td style="widtd:150px;">
|
45
|
+
<%=tr("Site URL")%>
|
46
|
+
</td>
|
47
|
+
<td>
|
48
|
+
<%=tr("URL where user will be taken to for full application functionality.")%>
|
49
|
+
</td>
|
50
|
+
<td>
|
51
|
+
false
|
52
|
+
</td>
|
53
|
+
</tr>
|
54
|
+
<tr>
|
55
|
+
<td style="widtd:150px;">
|
56
|
+
<%=tr("Site Domain")%>
|
57
|
+
</td>
|
58
|
+
<td>
|
59
|
+
<%=tr("Used for security purposes.")%>
|
60
|
+
<%=tr("Application authorization will not succeed unless you provide your site domain.")%>
|
61
|
+
</td>
|
62
|
+
<td>
|
63
|
+
true
|
64
|
+
</td>
|
65
|
+
</tr>
|
66
|
+
<tr>
|
67
|
+
<td style="widtd:150px;">
|
68
|
+
<%=tr("Application Type")%>
|
69
|
+
</td>
|
70
|
+
<td>
|
71
|
+
<%=tr("For a site extension, this field must be set to \"Web\".")%>
|
72
|
+
</td>
|
73
|
+
<td>
|
74
|
+
true
|
75
|
+
</td>
|
76
|
+
</tr>
|
77
|
+
<tr>
|
78
|
+
<td style="widtd:150px;">
|
79
|
+
<%=tr("API Version")%>
|
80
|
+
</td>
|
81
|
+
<td>
|
82
|
+
<%=tr("Default API version to be used, unless it is provided in the API request.")%>
|
83
|
+
</td>
|
84
|
+
<td>
|
85
|
+
false
|
86
|
+
</td>
|
87
|
+
</tr>
|
88
|
+
<tr>
|
89
|
+
<td style="widtd:150px;">
|
90
|
+
<%=tr("Callback URL")%>
|
91
|
+
</td>
|
92
|
+
<td>
|
93
|
+
<%=tr("Default callback URL (redirect_uri) that will be used for application authorization callback, unless it is provided in the parameters of the oauth request.")%>
|
94
|
+
</td>
|
95
|
+
<td>
|
96
|
+
false
|
97
|
+
</td>
|
98
|
+
</tr>
|
99
|
+
<tr>
|
100
|
+
<td style="widtd:150px;">
|
101
|
+
<%=tr("Deauthorization Callback URL")%>
|
102
|
+
</td>
|
103
|
+
<td>
|
104
|
+
<%=tr("When user removes (deauthorizes) your application, we will call this URL with user information.")%>
|
105
|
+
</td>
|
106
|
+
<td>
|
107
|
+
true
|
108
|
+
</td>
|
109
|
+
</tr>
|
110
|
+
<tr>
|
111
|
+
<td style="widtd:150px;">
|
112
|
+
<%=tr("Canvas Page")%>
|
113
|
+
</td>
|
114
|
+
<td>
|
115
|
+
<%=tr("Name of the canvas page that will be used to identify your application on {site_title}.", "", :site_title => Platform::Config.site_title)%>
|
116
|
+
<%=tr("This name must be unique and distinctively identify your application.")%>
|
117
|
+
</td>
|
118
|
+
<td>
|
119
|
+
true
|
120
|
+
</td>
|
121
|
+
</tr>
|
122
|
+
<tr>
|
123
|
+
<td style="widtd:150px;">
|
124
|
+
<%=tr("Canvas URL")%>
|
125
|
+
</td>
|
126
|
+
<td>
|
127
|
+
<%=tr("URL of your application's main page.")%>
|
128
|
+
</td>
|
129
|
+
<td>
|
130
|
+
true
|
131
|
+
</td>
|
132
|
+
</tr>
|
133
|
+
<tr>
|
134
|
+
<td style="widtd:150px;">
|
135
|
+
<%=tr("iFrame Size")%>
|
136
|
+
</td>
|
137
|
+
<td>
|
138
|
+
<%=tr("You have two options: limit application to the default 800x640 size of the iFrame and display scrollbars if your content is larger than the default size or make the application height grow with your content size.")%>
|
139
|
+
<%=tr("Choose \"Auto-resize\" if you are going to make the iFrame grow to the height of your app's content.")%>
|
140
|
+
</td>
|
141
|
+
<td>
|
142
|
+
true
|
143
|
+
</td>
|
144
|
+
</tr>
|
145
|
+
<tr>
|
146
|
+
<td style="widtd:150px;">
|
147
|
+
<%=tr("Authorization")%>
|
148
|
+
</td>
|
149
|
+
<td>
|
150
|
+
<%=tr("Choose \"App will handle authorization\" if your application will handle the authorization. Otherwise we will make sure the user has authorized your application and will pass you an access token as a parameter.")%>
|
151
|
+
</td>
|
152
|
+
<td>
|
153
|
+
true
|
154
|
+
</td>
|
155
|
+
</tr>
|
156
|
+
</table>
|
157
|
+
</p>
|
158
|
+
|
159
|
+
<h2><%=tr("Authorization Flow") %></h2>
|
160
|
+
<p>
|
161
|
+
<%=tr("There are two ways you could authorize your embedded application.")%>
|
162
|
+
<%=tr("If you chose to let Geni handle authorization then we will check if the user has authorized your application, and if not, we will present the authorization screen.")%>
|
163
|
+
<%=tr("Once user has authorized your app, we will pass you a valid access token as a parameter to your apps canvas URL.")%>
|
164
|
+
<%=tr("Alternatively, you can take the userto the authorization flow yourself, by redirecting the iframce to the authorization URL.")%>
|
165
|
+
</p>
|
166
|
+
|
167
|
+
<h3><%=tr("Oauth URL")%></h3>
|
168
|
+
<div class="code_snippet">
|
169
|
+
https://<%=Platform::Config.site_base_url %>/platform/oauth/authorize
|
170
|
+
</div>
|
171
|
+
<h3><%=tr("Parameters")%></h3>
|
172
|
+
<p>
|
173
|
+
<table class="documentation_table">
|
174
|
+
<tr>
|
175
|
+
<th style="width:150px;">
|
176
|
+
<%=tr("Name") %>
|
177
|
+
</th>
|
178
|
+
<th>
|
179
|
+
<%=tr("Description") %>
|
180
|
+
</th>
|
181
|
+
<th style="width:150px;">
|
182
|
+
<%=tr("Required") %>
|
183
|
+
</th>
|
184
|
+
</tr>
|
185
|
+
<tr>
|
186
|
+
<td>
|
187
|
+
client_id
|
188
|
+
</td>
|
189
|
+
<td>
|
190
|
+
<%=tr("Application key generated during the app registration.")%>
|
191
|
+
</td>
|
192
|
+
<td>
|
193
|
+
true
|
194
|
+
</td>
|
195
|
+
</tr>
|
196
|
+
<tr>
|
197
|
+
<td>
|
198
|
+
redirect_uri
|
199
|
+
</td>
|
200
|
+
<td>
|
201
|
+
<%=tr("URL that the user's browser will be redirected back to once the application authorization is completed.") %>
|
202
|
+
<%=tr("You can specify this URL in your application settings as a Callback URL, or pass it as a request paremeter.") %>
|
203
|
+
<%=tr("The redirect_uri must be within the same domain as the Site Domain you specified in the application settings.") %>
|
204
|
+
</td>
|
205
|
+
<td>
|
206
|
+
true
|
207
|
+
</td>
|
208
|
+
</tr>
|
209
|
+
<tr>
|
210
|
+
<td>
|
211
|
+
response_type
|
212
|
+
</td>
|
213
|
+
<td>
|
214
|
+
<%=tr("For the server side flow the response type is defaulted to \"token\" and you don't need to pass it as a parameter.") %>
|
215
|
+
</td>
|
216
|
+
<td>
|
217
|
+
true
|
218
|
+
</td>
|
219
|
+
</tr>
|
220
|
+
<tr>
|
221
|
+
<td>
|
222
|
+
scope
|
223
|
+
</td>
|
224
|
+
<td>
|
225
|
+
<%=tr("A comma delimited list of permissions that the application needs.") %> <%=tr("By default the scope is set to a full data access.") %><%=tr("This is subject to change in the upcoming releases.") %>
|
226
|
+
</td>
|
227
|
+
<td>
|
228
|
+
false
|
229
|
+
</td>
|
230
|
+
</tr>
|
231
|
+
<tr>
|
232
|
+
<td>
|
233
|
+
display
|
234
|
+
</td>
|
235
|
+
<td>
|
236
|
+
<%=tr("For the server side flow the display parameter is defaulted to \"web\".") %>
|
237
|
+
</td>
|
238
|
+
<td>
|
239
|
+
false
|
240
|
+
</td>
|
241
|
+
</tr>
|
242
|
+
</table>
|
243
|
+
</p>
|
244
|
+
<h3><%=tr("Example")%></h3>
|
245
|
+
<div class="code_snippet">
|
246
|
+
https://<%=Platform::Config.site_base_url %>/platform/oauth/authorize?client_id=YOUR_APP_KEY&redirect_uri=YOUR_URL&response_type=token
|
247
|
+
</div>
|
248
|
+
<p style="text-align:center">
|
249
|
+
<%=image_tag("platform/help/auth_iframe.png", :style=>"width:600px;", :class => "screenshot") %>
|
250
|
+
</p>
|
251
|
+
<p>
|
252
|
+
<%=tr("If the user presses Don't Allow, your app is not authorized.") %><%=tr("The user will be redirected (via HTTP 302) to the URL you passed in the redirect_uri parameter with the following error information:") %>
|
253
|
+
</p>
|
254
|
+
<h3><%=tr("Returned Fields") %></h3>
|
255
|
+
<p>
|
256
|
+
<table class="documentation_table">
|
257
|
+
<tr>
|
258
|
+
<th style="width:150px;">
|
259
|
+
<%=tr("Name") %>
|
260
|
+
</th>
|
261
|
+
<th style="width:150px;">
|
262
|
+
<%=tr("Type") %>
|
263
|
+
</th>
|
264
|
+
<th>
|
265
|
+
<%=tr("Description") %>
|
266
|
+
</th>
|
267
|
+
</tr>
|
268
|
+
<tr>
|
269
|
+
<td style="widtd:150px;">
|
270
|
+
status
|
271
|
+
</td>
|
272
|
+
<td style="widtd:150px;">
|
273
|
+
String
|
274
|
+
</td>
|
275
|
+
<td>
|
276
|
+
<%=tr("If user cancels the authorization flow, the status will be set to \"unauthorized\".") %>
|
277
|
+
</td>
|
278
|
+
</tr>
|
279
|
+
<tr>
|
280
|
+
<td style="widtd:150px;">
|
281
|
+
message
|
282
|
+
</td>
|
283
|
+
<td style="widtd:150px;">
|
284
|
+
String
|
285
|
+
</td>
|
286
|
+
<td>
|
287
|
+
<%=tr("Error message") %>
|
288
|
+
</td>
|
289
|
+
</tr>
|
290
|
+
</table>
|
291
|
+
</p>
|
292
|
+
<h3><%=tr("Example") %></h3>
|
293
|
+
<div class="code_snippet">
|
294
|
+
http://YOUR_URL#status=unauthorized&message=user+canceled
|
295
|
+
</div>
|
296
|
+
<p>
|
297
|
+
<%=tr("If the user presses Allow, your app is authorized.") %><%=tr("The user will be redirected (via HTTP 302) to the URL you passed in the redirect_uri parameter with an authorization code:") %>
|
298
|
+
</p>
|
299
|
+
<h3><%=tr("Returned Fields") %></h3>
|
300
|
+
<p>
|
301
|
+
<table class="documentation_table">
|
302
|
+
<tr>
|
303
|
+
<th style="width:150px;">
|
304
|
+
<%=tr("Name") %>
|
305
|
+
</th>
|
306
|
+
<th style="width:150px;">
|
307
|
+
<%=tr("Type") %>
|
308
|
+
</th>
|
309
|
+
<th>
|
310
|
+
<%=tr("Description") %>
|
311
|
+
</th>
|
312
|
+
</tr>
|
313
|
+
<tr>
|
314
|
+
<td style="widtd:150px;">
|
315
|
+
access_token
|
316
|
+
</td>
|
317
|
+
<td style="widtd:150px;">
|
318
|
+
String
|
319
|
+
</td>
|
320
|
+
<td>
|
321
|
+
<%=tr("Access token to be used with every API request")%>
|
322
|
+
</td>
|
323
|
+
</tr>
|
324
|
+
<tr>
|
325
|
+
<td style="widtd:150px;">
|
326
|
+
expires_in
|
327
|
+
</td>
|
328
|
+
<td style="widtd:150px;">
|
329
|
+
Number
|
330
|
+
</td>
|
331
|
+
<td>
|
332
|
+
<%=tr("Seconds until the token will expire")%>
|
333
|
+
</td>
|
334
|
+
</tr>
|
335
|
+
</table>
|
336
|
+
</p>
|
337
|
+
<h3><%=tr("Example")%></h3>
|
338
|
+
<div class="code_snippet">
|
339
|
+
http://YOUR_URL#access_token=ACCESS_TOKEN_GENERATED_BY_SERVER&expires_in=SECONDS_UNTIL_IT_IS_EXPIRED
|
340
|
+
</div>
|
341
|
+
</div>
|
342
|
+
<%= render :partial => "footer" %>
|
@@ -0,0 +1,371 @@
|
|
1
|
+
<%= render :partial => "header" %>
|
2
|
+
|
3
|
+
<div class="documentation_section_title">
|
4
|
+
<%= tr("Authentication with {site_title}", "", :site_title => Platform::Config.site_title) %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="documentation_section">
|
8
|
+
<p>
|
9
|
+
<%=tr("{site_title} Platform uses the [link: OAuth 2.0 protocol] for authentication and authorization.", "", :site_title => Platform::Config.site_title, :link => ["http://tools.ietf.org/html/draft-ietf-oauth-v2-20"]) %>
|
10
|
+
<%=tr("The Platform supports a number of different flows that you can use within your website, desktop and mobile applications.")%>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<h2><%=tr("Authenticaton/Authorization Flows")%></h2>
|
14
|
+
<p>
|
15
|
+
<%=tr("The following table outlines the various mechanisms {site_title} Platform uses to support each of those flows.", "", :site_title => Platform::Config.site_title)%>
|
16
|
+
</p>
|
17
|
+
<p>
|
18
|
+
<table class="documentation_table">
|
19
|
+
<tr>
|
20
|
+
<th style="width:100px;"><%=tr("Flow Name")%></th>
|
21
|
+
<th style="width:150px;"><%=tr("OAuth 2.0 Specification")%></th>
|
22
|
+
<th><%=tr("Description")%></th>
|
23
|
+
</tr>
|
24
|
+
<tr>
|
25
|
+
<td>
|
26
|
+
<%=link_to(tr("Server Side Flow"), :action => :oauth_server_side)%>
|
27
|
+
</td>
|
28
|
+
<td>
|
29
|
+
<a href="http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1"><%=tr("Authentication Code")%></a>
|
30
|
+
</td>
|
31
|
+
<td>
|
32
|
+
<%=tr("Use this flow if your application needs to call {app}'s API from the server side", "", :app => Platform::Config.site_title)%>
|
33
|
+
</td>
|
34
|
+
</tr>
|
35
|
+
<tr>
|
36
|
+
<td>
|
37
|
+
<%=link_to(tr("Client Side Flow"), :action => :oauth_client_side)%>
|
38
|
+
</td>
|
39
|
+
<td>
|
40
|
+
<a href="http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2"><%=tr("Implicit Grant")%></a>
|
41
|
+
</td>
|
42
|
+
<td>
|
43
|
+
<%=tr("Use this flow if your application needs to call {site_title}'s API from a client, such as JavaScript in a Web browser or from a native mobile or desktop application.", "", :site_title => Tr8n::Config.site_title)%>
|
44
|
+
</td>
|
45
|
+
</tr>
|
46
|
+
<tr>
|
47
|
+
<td>
|
48
|
+
<%=link_to(tr("Client Side Flow"), :action => :oauth_desktop)%>
|
49
|
+
</td>
|
50
|
+
<td>
|
51
|
+
<a href="http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2"><%=tr("Implicit Grant")%></a>
|
52
|
+
</td>
|
53
|
+
<td>
|
54
|
+
<%=tr("Customized version of the Client Side Flow targeted for Desktop applications.")%>
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr>
|
58
|
+
<td>
|
59
|
+
<%=link_to(tr("Mobile App Flow"), :action => :oauth_mobile)%>
|
60
|
+
</td>
|
61
|
+
<td>
|
62
|
+
<a href="http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2"><%=tr("Implicit Grant")%></a>
|
63
|
+
</td>
|
64
|
+
<td>
|
65
|
+
<%=tr("Customized version of the Client Side Flow targeted for Mobile applications.")%>
|
66
|
+
</td>
|
67
|
+
</tr>
|
68
|
+
<tr>
|
69
|
+
<td>
|
70
|
+
<%=link_to(tr("Trusted App Flow"), :action => :oauth_trusted_client)%>
|
71
|
+
</td>
|
72
|
+
<td>
|
73
|
+
<a href="http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.3"><%=tr("Resource Owner Password Credentials") %></a>
|
74
|
+
</td>
|
75
|
+
<td>
|
76
|
+
<%=tr("Use this flow only if your application has a trust relationship with the user and no other flow can work for your application.")%> <%=tr("For example, if you have a highly privileged desktop application and user wants to give your application explicit access to the user data.") %>
|
77
|
+
<%=tr("This flow is not enabled by default.") %> <%=tr("If you want to use this flow, please email us and after we review your application we will make a decision on granting you the flow access.")%>
|
78
|
+
</td>
|
79
|
+
</tr>
|
80
|
+
<tr>
|
81
|
+
<td>
|
82
|
+
<%=link_to("App Login Flow", :action => :oauth_app_login)%>
|
83
|
+
</td>
|
84
|
+
<td>
|
85
|
+
<a href="http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.4">Client Credentials</a>
|
86
|
+
</td>
|
87
|
+
<td>
|
88
|
+
<%=tr("Use this flow if your application needs to retrieve public data or take adminstrative actions. ") %>
|
89
|
+
<%=tr("The calls will not be made on behalf of the user, but on behalf of the app itself. ") %>
|
90
|
+
<%=tr("Unlike public api calls without a token, this flow has a higher rate limit.")%>
|
91
|
+
</td>
|
92
|
+
</tr>
|
93
|
+
</table>
|
94
|
+
</p>
|
95
|
+
|
96
|
+
<h2><%=tr("Authorization Request")%></h2>
|
97
|
+
<p>
|
98
|
+
<%=tr("Authorization process uses web interface that allows users to login to the site and authorize your application to have access to their data.")%>
|
99
|
+
</p>
|
100
|
+
<h3><%=tr("Request URL") %></h3>
|
101
|
+
<div class="code_snippet">
|
102
|
+
https://<%=Platform::Config.site_base_url %>/platform/oauth/authorize
|
103
|
+
</div>
|
104
|
+
|
105
|
+
<h3><%=tr("Parameters") %></h3>
|
106
|
+
<p>
|
107
|
+
<table class="documentation_table">
|
108
|
+
<tr>
|
109
|
+
<th style="width:150px;">
|
110
|
+
<%=tr("Name") %>
|
111
|
+
</th>
|
112
|
+
<th>
|
113
|
+
<%=tr("Description") %>
|
114
|
+
</th>
|
115
|
+
<th style="width:150px;">
|
116
|
+
<%=tr("Required") %>
|
117
|
+
</th>
|
118
|
+
</tr>
|
119
|
+
<tr>
|
120
|
+
<td>
|
121
|
+
client_id
|
122
|
+
</td>
|
123
|
+
<td>
|
124
|
+
<%=tr("Application key (or id) is generated during the application registration.") %>
|
125
|
+
</td>
|
126
|
+
<td>
|
127
|
+
<%=tr("Required for all flows")%>
|
128
|
+
</td>
|
129
|
+
</tr>
|
130
|
+
<tr>
|
131
|
+
<td>
|
132
|
+
redirect_uri
|
133
|
+
</td>
|
134
|
+
<td>
|
135
|
+
<%=tr("URL that the user's browser will be redirected to once the application authorization is complete.") %>
|
136
|
+
<%=tr("You can specify this URL in your application settings as a Callback URL, or pass it as a request paremeter.") %>
|
137
|
+
<%=tr("The redirect_uri must be within the same domain as the Site Domain you specified in the application settings.") %>
|
138
|
+
</td>
|
139
|
+
<td>
|
140
|
+
<%=tr("Required for all flows")%>
|
141
|
+
</td>
|
142
|
+
</tr>
|
143
|
+
<tr>
|
144
|
+
<td>
|
145
|
+
response_type
|
146
|
+
</td>
|
147
|
+
<td>
|
148
|
+
<%=tr("Available options: {opts}.", "", :opts => "code, token") %>
|
149
|
+
<%=tr("Default: ")%> code
|
150
|
+
</td>
|
151
|
+
<td>
|
152
|
+
false
|
153
|
+
</td>
|
154
|
+
</tr>
|
155
|
+
<tr>
|
156
|
+
<td>
|
157
|
+
scope
|
158
|
+
</td>
|
159
|
+
<td>
|
160
|
+
<%=tr("A comma delimited list of permissions that the application needs.") %>
|
161
|
+
<%=tr("By default the scope is set to a full data access.") %>
|
162
|
+
</td>
|
163
|
+
<td>
|
164
|
+
false
|
165
|
+
</td>
|
166
|
+
</tr>
|
167
|
+
<tr>
|
168
|
+
<td>
|
169
|
+
display
|
170
|
+
</td>
|
171
|
+
<td>
|
172
|
+
<%=tr("Provides a mechanism to select an appropriate template to display the authorization flow.")%>
|
173
|
+
<%=tr("Available options: {opts}.", "", :opts => "web, mobile, desktop, iframe") %>
|
174
|
+
<%=tr("Default: ")%> web
|
175
|
+
</td>
|
176
|
+
<td>
|
177
|
+
false
|
178
|
+
</td>
|
179
|
+
</tr>
|
180
|
+
<tr>
|
181
|
+
<td>
|
182
|
+
state
|
183
|
+
</td>
|
184
|
+
<td>
|
185
|
+
<%=tr("Used for additional parameters and [link: CSRF protection].", "", :link => ["http://en.wikipedia.org/wiki/Cross-site_request_forgery"]) %>
|
186
|
+
</td>
|
187
|
+
<td>
|
188
|
+
false
|
189
|
+
</td>
|
190
|
+
</tr>
|
191
|
+
</table>
|
192
|
+
</p>
|
193
|
+
<h3><%=tr("Example") %></h3>
|
194
|
+
<div class="code_snippet">
|
195
|
+
https://<%=Platform::Config.site_base_url %>/platform/oauth/authorize?client_id=YOUR_APP_KEY&redirect_uri=YOUR_URL
|
196
|
+
</div>
|
197
|
+
|
198
|
+
<h3><%=tr("Returned Fields") %></h3>
|
199
|
+
<p>
|
200
|
+
<%=tr("Return fields will vary based on the flow and the request parameters you pass in.")%>
|
201
|
+
<%=tr("See the flow you are interested in for more information.")%>
|
202
|
+
</p>
|
203
|
+
|
204
|
+
|
205
|
+
<h2><%=tr("Request Token API")%></h2>
|
206
|
+
<p>
|
207
|
+
<%=tr("Request token API is used to exchange athorization code or a refresh token for a valid access token.")%>
|
208
|
+
<%=tr("Depending on the flow you chose, you will have different options for calling this API.")%>
|
209
|
+
<%=tr("This API will always return results encoded in JSON format.")%>
|
210
|
+
</p>
|
211
|
+
<h3><%=tr("End Point") %></h3>
|
212
|
+
<div class="code_snippet">
|
213
|
+
https://<%=Platform::Config.site_base_url %>/platform/oauth/request_token
|
214
|
+
</div>
|
215
|
+
<h3><%=tr("Parameters") %></h3>
|
216
|
+
<p>
|
217
|
+
<table class="documentation_table">
|
218
|
+
<tr>
|
219
|
+
<th style="width:150px;">
|
220
|
+
<%=tr("Name") %>
|
221
|
+
</th>
|
222
|
+
<th>
|
223
|
+
<%=tr("Description") %>
|
224
|
+
</th>
|
225
|
+
<th style="width:150px;">
|
226
|
+
<%=tr("Required") %>
|
227
|
+
</th>
|
228
|
+
</tr>
|
229
|
+
<tr>
|
230
|
+
<td>
|
231
|
+
client_id
|
232
|
+
</td>
|
233
|
+
<td>
|
234
|
+
<%=tr("Application key (or id) is generated during the app registration.") %>
|
235
|
+
</td>
|
236
|
+
<td>
|
237
|
+
<%=tr("Required for all flows")%>
|
238
|
+
</td>
|
239
|
+
</tr>
|
240
|
+
<tr>
|
241
|
+
<td>
|
242
|
+
client_secret
|
243
|
+
</td>
|
244
|
+
<td>
|
245
|
+
<%=tr("Application secret generated during the registration process and availble in the application settings.") %>
|
246
|
+
<%=tr("The app secret should never be shared with anyone or embedded in any code that you will distribute (you should use the client-side flow for these scenarios).") %>
|
247
|
+
</td>
|
248
|
+
<td>
|
249
|
+
<%=tr("Required for certain flows")%>
|
250
|
+
</td>
|
251
|
+
</tr>
|
252
|
+
<tr>
|
253
|
+
<td>
|
254
|
+
redirect_uri
|
255
|
+
</td>
|
256
|
+
<td>
|
257
|
+
<%=tr("URL that was used to get the authorization code.") %>
|
258
|
+
<%=tr("The redirect_uri must be within the same domain as the Site Domain you specify in the application settings.") %>
|
259
|
+
</td>
|
260
|
+
<td>
|
261
|
+
<%=tr("Required for certain flows")%>
|
262
|
+
</td>
|
263
|
+
</tr>
|
264
|
+
<tr>
|
265
|
+
<td>
|
266
|
+
grant_type
|
267
|
+
</td>
|
268
|
+
<td>
|
269
|
+
<%=tr("Available options: {opts}.", "", :opts => "authorization_code, password, refresh_token") %>
|
270
|
+
<%=tr("For the server side flow the response type is defaulted to \"authorization_code\".") %>
|
271
|
+
</td>
|
272
|
+
<td>
|
273
|
+
true
|
274
|
+
</td>
|
275
|
+
</tr>
|
276
|
+
</table>
|
277
|
+
</p>
|
278
|
+
<p>
|
279
|
+
<%=tr("There are additional parameters based on the flow and the grant_type value.")%>
|
280
|
+
</p>
|
281
|
+
|
282
|
+
<h3><%=tr("Returned Fields") %></h3>
|
283
|
+
<p>
|
284
|
+
<%=tr("Return fields will vary based on the flow and the request parameters.")%>
|
285
|
+
<%=tr("See the flow you are interested in from the list above.")%>
|
286
|
+
</p>
|
287
|
+
|
288
|
+
<h2><%=tr("Validate Token API")%></h2>
|
289
|
+
<p>
|
290
|
+
<%=tr("Verifies whether the token is valid.")%>
|
291
|
+
</p>
|
292
|
+
<h3><%=tr("End Point") %></h3>
|
293
|
+
<div class="code_snippet">
|
294
|
+
https://<%=Platform::Config.site_base_url %>/platform/oauth/validate_token
|
295
|
+
</div>
|
296
|
+
<h3><%=tr("Parameters") %></h3>
|
297
|
+
<p>
|
298
|
+
<table class="documentation_table">
|
299
|
+
<tr>
|
300
|
+
<th style="width:150px;">
|
301
|
+
<%=tr("Name") %>
|
302
|
+
</th>
|
303
|
+
<th>
|
304
|
+
<%=tr("Description") %>
|
305
|
+
</th>
|
306
|
+
<th style="width:150px;">
|
307
|
+
<%=tr("Required") %>
|
308
|
+
</th>
|
309
|
+
</tr>
|
310
|
+
<tr>
|
311
|
+
<td>
|
312
|
+
access_token
|
313
|
+
</td>
|
314
|
+
<td>
|
315
|
+
<%=tr("Access token to be validated.") %>
|
316
|
+
</td>
|
317
|
+
<td>
|
318
|
+
true
|
319
|
+
</td>
|
320
|
+
</tr>
|
321
|
+
</table>
|
322
|
+
</p>
|
323
|
+
<h3><%=tr("Returned Fields") %></h3>
|
324
|
+
<p>
|
325
|
+
<%=tr("Returns a flag that indicates whether the token is valid or not.")%>
|
326
|
+
</p>
|
327
|
+
|
328
|
+
|
329
|
+
<h2><%=tr("Invalidate Token API")%></h2>
|
330
|
+
<p>
|
331
|
+
<%=tr("Invalidates the token.")%>
|
332
|
+
</p>
|
333
|
+
<h3><%=tr("End Point") %></h3>
|
334
|
+
<div class="code_snippet">
|
335
|
+
https://<%=Platform::Config.site_base_url %>/platform/oauth/invalidate_token
|
336
|
+
</div>
|
337
|
+
<h3><%=tr("Parameters") %></h3>
|
338
|
+
<p>
|
339
|
+
<table class="documentation_table">
|
340
|
+
<tr>
|
341
|
+
<th style="width:150px;">
|
342
|
+
<%=tr("Name") %>
|
343
|
+
</th>
|
344
|
+
<th>
|
345
|
+
<%=tr("Description") %>
|
346
|
+
</th>
|
347
|
+
<th style="width:150px;">
|
348
|
+
<%=tr("Required") %>
|
349
|
+
</th>
|
350
|
+
</tr>
|
351
|
+
<tr>
|
352
|
+
<td>
|
353
|
+
access_token
|
354
|
+
</td>
|
355
|
+
<td>
|
356
|
+
<%=tr("Access token to be invalidated.") %>
|
357
|
+
</td>
|
358
|
+
<td>
|
359
|
+
true
|
360
|
+
</td>
|
361
|
+
</tr>
|
362
|
+
</table>
|
363
|
+
</p>
|
364
|
+
<h3><%=tr("Returned Fields") %></h3>
|
365
|
+
<p>
|
366
|
+
<%=tr("Returns a flag that indicates whether the token was invalidated.")%>
|
367
|
+
</p>
|
368
|
+
|
369
|
+
</div>
|
370
|
+
|
371
|
+
<%= render :partial => "footer" %>
|