vline-rails 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,25 +1,25 @@
1
1
  # vLineRails Plugin
2
2
 
3
- vLineRails is a plugin that allows any Rails app to act as a vLine Identity Provider. Every vLine application instance
3
+ vLineRails is a plugin that allows any Rails app to act as a vLine Identity Provider. Every vLine service
4
4
  has at least one registered Identity Provider, which is responsible for authenticating users and providing access to their
5
5
  contact lists and group memberships. The [Identity Provider interface](https://vline.com/developer/docs/identity_providers)
6
6
  is a subset of OAuth 2.0 and OpenSocial 2.5.
7
7
 
8
- Learn more about vLine applications at: https://vline.com/developer
8
+ Learn more about vLine services at: https://vline.com/developer/
9
9
 
10
10
  ## Before you begin
11
11
 
12
12
  Before installing the plugin, you'll need to:
13
13
 
14
- 1. Sign up for a vLine account at https://vline.com
14
+ 1. Sign up for a vLine account at https://vline.com.
15
15
 
16
- 2. Login to the [Developer Console](https://vline.com/developer) and click `Create Application`
16
+ 2. Login to the [Developer Console](https://vline.com/developer/) and click `Create Service`.
17
17
 
18
- 3. Choose a name for your application.
18
+ 3. Choose a name for your service.
19
19
 
20
20
  ## Testing Locally
21
21
 
22
- For the vLine servers to be able to make api calls to your provider, your rails app will need to be running on a
22
+ For the vLine servers to be able to make API calls to your provider, your Rails app will need to be running on a
23
23
  publicly accessible server. If your development server is behind a firewall, you can make it publicly accessible
24
24
  with [Forward](http://forwardhq.com):
25
25
 
@@ -27,7 +27,7 @@ with [Forward](http://forwardhq.com):
27
27
  forward 3000
28
28
 
29
29
  If your provider suddenly stops working, check to make sure forward is still running and
30
- your server is accessible at the forward url.
30
+ your server is accessible at the forward URL.
31
31
 
32
32
  ## Installation (Rails 3.0)
33
33
 
@@ -41,33 +41,31 @@ your server is accessible at the forward url.
41
41
 
42
42
  1. Generate the provider by running the following command:
43
43
 
44
- rails generate vline_provider --app-id=Your-App-Id --provider-secret=Your-App-Secret
44
+ rails generate vline_provider --service-id=Your-Service-Id --provider-secret=Your-Service-API-Secret
45
45
 
46
46
  Make note of the `Client Id` and `Client Secret` output by the command.
47
47
 
48
- 1. Review the generated VlineProviderController, making any changes necessary to work with your models, authentication
49
- framework, and authorization framework.
48
+ 1. Review the generated `VlineProviderController`, making any changes necessary to work with your models,
49
+ authentication framework, and authorization framework.
50
50
 
51
51
  vim app/controllers/vline_controller.rb
52
52
 
53
- ## Configure your app
53
+ ## Configure your Web Client
54
54
 
55
- 1. Open up the vLine Developer Console and choose `Hosted App Settings`.
55
+ 1. Open up the [vLine Developer Console](https://vline.com/developer/) and choose `Service Settings`.
56
56
 
57
- 1. You'll notice there are default URLs set for images used by the app. You can leave these as-is or change them to
58
- custom images for your app.
59
-
60
- 1. Select `Custom OAuth` in the `Authorization` dropdown:
57
+ 1. Click the `Edit` button and select `Custom OAuth` in the `Authorization` dropdown:
61
58
  * Add the `Client Id` and `Client Secret` from the `rails generate` command you previously ran.
62
59
  * Set the `Provider URL` to : `https://your-forward-url/_vline/api/v1/`
63
60
  * Set the `OAuth URL` to: `https://your-forward-url/_vline/api/v1/oauth/`
64
61
 
62
+ 1. Further customization of the Web Client can be done by providing custom images in the `Web Client Settings`.
65
63
 
66
64
  ## Usage
67
65
 
68
- You can now launch into your vLine application from any view.
66
+ You can now launch into your vLine Web Client from any view.
69
67
 
70
- To launch to the application home page:
68
+ To launch to the Web Client home page:
71
69
 
72
70
  <%= vline_launch 'Launch' %>
73
71
 
@@ -86,5 +84,5 @@ To launch to a particular user's chat page:
86
84
  run YourApp::Application
87
85
 
88
86
  * It's common to need to test changes before rolling them out directly to your users. We suggest creating two vLine
89
- applications, one of which you can use to test out changes before rolling them out to your users (e.g.,
90
- `myapp` and `myapp-dev`).
87
+ services, one of which you can use to test out changes before rolling them out to your users (e.g.,
88
+ `myservice` and `myservice-dev`).
@@ -2,8 +2,8 @@ require 'vline'
2
2
 
3
3
  Vline.setup do |config|
4
4
 
5
- config.app_id = '<%= options.app_id %>'
6
- config.provider_id = '<%= options.app_id %>'
5
+ config.service_id = '<%= options.service_id %>'
6
+ config.provider_id = '<%= options.service_id %>'
7
7
  config.client_id = '<%= options.client_id %>'
8
8
 
9
9
  # WARNING: Do not check these values into VCS!
@@ -5,8 +5,8 @@ class VlineProviderGenerator < Rails::Generators::NamedBase
5
5
 
6
6
  argument :name, :type => :string, :default => 'Vline'
7
7
 
8
- class_option :app_id, :type => :string, :required => true,
9
- :desc => 'Your vline application id'
8
+ class_option :service_id, :type => :string, :required => true,
9
+ :desc => 'Your vLine Service ID'
10
10
  class_option :client_id, :type => :string, :default => SecureRandom.urlsafe_base64(32),
11
11
  :desc => 'OAUTH client ID'
12
12
  class_option :client_secret, :type => :string, :default => SecureRandom.urlsafe_base64(32),
@@ -42,7 +42,7 @@ class VlineProviderGenerator < Rails::Generators::NamedBase
42
42
  end
43
43
 
44
44
  def output
45
- say_status "App ID", "#{options[:app_id]}", :blue
45
+ say_status "Service ID", "#{options[:service_id]}", :blue
46
46
  say_status "Client ID", "#{options[:client_id]}", :blue
47
47
  say_status "Client Secret", "#{options[:client_secret]}", :blue
48
48
  end
data/lib/vline.rb CHANGED
@@ -2,8 +2,8 @@ require 'grape'
2
2
  require 'jwt'
3
3
 
4
4
  module Vline
5
- mattr_accessor :app_id
6
- @@app_id = nil
5
+ mattr_accessor :service_id
6
+ @@service_id = nil
7
7
 
8
8
  mattr_accessor :provider_id
9
9
  @@provider_id = nil
@@ -154,7 +154,7 @@ module Vline
154
154
  end
155
155
 
156
156
  def self.auth_url
157
- "#{Vline.client_callback_url_base}/#{Vline.app_id}/#{Vline.provider_id}"
157
+ "#{Vline.client_callback_url_base}/#{Vline.service_id}/#{Vline.provider_id}"
158
158
  end
159
159
 
160
160
  def self.auth_error_redirect_url(error, state)
data/lib/vline/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vline
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vline-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-03-12 00:00:00.000000000 Z
14
+ date: 2013-04-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails