loginradius 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -4,19 +4,44 @@ Rails gem which enables token authentication against loginradius.com
4
4
 
5
5
  == Example usage
6
6
 
7
- class SessionsController < ApplicationController
8
- protect_from_forgery :except => :callback
7
+ class SessionsController < ApplicationController
8
+ protect_from_forgery :except => :callback
9
+
10
+ def callback
11
+ logger.debug "received LoginRadius callback!"
12
+
13
+ # Initialize the LoginRadius session - API key
14
+ loginradius = LoginRadius::LoginRadiusSession.new "INSERT YOUR KEY HERE"
15
+
16
+ # Authenticate the LoginRadius session vs. the token being passed to our app
17
+ if loginradius.authenticate_token? params[:token], params[:lrid]
18
+ logger.debug "successfully authenticated LoginRadius"
19
+ logger.debug loginradius.data
20
+
21
+ # Now need to create user record or login user
22
+ ...
9
23
 
10
- def callback
11
- logger.debug "received LoginRadius callback!"
24
+ == LICENSE:
12
25
 
13
- # Initialize the LoginRadius session - API key
14
- loginradius = LoginRadius::LoginRadiusSession.new "INSERT YOUR KEY HERE"
26
+ (The MIT License)
15
27
 
16
- # Authenticate the LoginRadius session vs. the token being passed to our app
17
- if loginradius.authenticate_token? params[:token], params[:lrid]
18
- logger.debug "successfully authenticated LoginRadius"
19
- logger.debug loginradius.data
28
+ Copyright (c) Si Cruse, mindcultivator.com
20
29
 
21
- # Now need to create user record or login user
22
- ...
30
+ Permission is hereby granted, free of charge, to any person obtaining
31
+ a copy of this software and associated documentation files (the
32
+ "Software"), to deal in the Software without restriction, including
33
+ without limitation the rights to use, copy, modify, merge, publish,
34
+ distribute, sublicense, and/or sell copies of the Software, and to
35
+ permit persons to whom the Software is furnished to do so, subject to
36
+ the following conditions:
37
+
38
+ The above copyright notice and this permission notice shall be
39
+ included in all copies or substantial portions of the Software.
40
+
41
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
42
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
43
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
44
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
45
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
46
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
47
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('loginradius', '0.1.1') do |p|
5
+ Echoe.new('loginradius', '0.1.2') do |p|
6
6
  p.description = "Enables token authentication against loginradius.com"
7
7
  p.url = "http://github.com/sicruse/loginradius"
8
8
  p.author = "Si Cruse"
data/lib/loginradius.rb CHANGED
@@ -30,7 +30,7 @@ module LoginRadius
30
30
  @data = ""
31
31
  end
32
32
 
33
- def authenticate_token?(token, id)
33
+ def is_authentic_token?(token, id)
34
34
  @data = api_call 'userprofile', :token => token
35
35
  result = (@data['ID'].to_s == id.to_s)
36
36
  end
data/loginradius.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "loginradius"
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Si Cruse"]
9
- s.date = "2012-03-29"
9
+ s.date = "2012-03-30"
10
10
  s.description = "Enables token authentication against loginradius.com"
11
11
  s.email = "si@mindcultivator.com"
12
12
  s.extra_rdoc_files = ["README.rdoc", "lib/loginradius.rb"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loginradius
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-29 00:00:00.000000000 Z
12
+ date: 2012-03-30 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Enables token authentication against loginradius.com
15
15
  email: si@mindcultivator.com