loginradius 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +37 -12
- data/Rakefile +1 -1
- data/lib/loginradius.rb +1 -1
- data/loginradius.gemspec +2 -2
- metadata +2 -2
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
|
-
|
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
|
-
|
11
|
-
logger.debug "received LoginRadius callback!"
|
24
|
+
== LICENSE:
|
12
25
|
|
13
|
-
|
14
|
-
loginradius = LoginRadius::LoginRadiusSession.new "INSERT YOUR KEY HERE"
|
26
|
+
(The MIT License)
|
15
27
|
|
16
|
-
|
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
|
-
|
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.
|
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
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.
|
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-
|
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.
|
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-
|
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
|