authlogic_crowd_rest 1.0.0 → 1.0.1

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
@@ -1,6 +1,27 @@
1
- = authlogic_crowd_rest
1
+ = Authlogic Plugin for Atlassian Crowd
2
2
 
3
- Description goes here.
3
+ Authlogic Crowd Rest is an extension of the Authlogic library to add support for validation against Atlassian Crowd REST apis.
4
+
5
+
6
+ == Helpful links
7
+
8
+ * <b>Documentation:</b> http://github.com/robdimarco/authlogic_crowd_rest
9
+ * <b>Authlogic:</b> http://github.com/binarylogic/authlogic
10
+ * <b>Atlassian Crowd:</b> http://www.atlassian.com/software/crowd/
11
+ * <b>Atlassian Crowd REST API:</b> http://confluence.atlassian.com/display/CROWDDEV/Crowd+REST+APIs
12
+
13
+ == Install and use
14
+
15
+ === 1. Add the Authlogic Crowd REST plugin to your Gemfile
16
+ gem "authlogic_crowd_rest"
17
+
18
+ === 2. You will need to configure crowd for use with the following three configuration pieces to User like so:
19
+
20
+ class UserSession < Authlogic::Session::Base
21
+ crowd_base_url "http://localhost:8095/crowd/console" # URL to crowd
22
+ crowd_application_name "myapp" # Name of the application in Crowd
23
+ crowd_application_password "bogus" # Password assigned to the application in Crowd
24
+ end
4
25
 
5
26
  == Contributing to authlogic_crowd_rest
6
27
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{authlogic_crowd_rest}
8
- s.version = "1.0.0"
8
+ s.version = "1.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rob Di Marco"]
@@ -80,9 +80,10 @@ module AuthlogicCrowdRest
80
80
  uri = URI.parse(send("crowd_base_url"))
81
81
 
82
82
  begin
83
- Net::HTTP.start(uri.host, uri.port) {|http|
84
- http.use_ssl = uri.scheme == "https"
85
- req = Net::HTTP::Post.new(uri.path + "?" + "username=#{attempted_record.login}")
83
+ http = Net::HTTP.new(uri.host, uri.port)
84
+ http.use_ssl = uri.scheme == "https"
85
+ http.start {|http|
86
+ req = Net::HTTP::Post.new(uri.path + "?" + "username=#{send(login_field)}")
86
87
  req.basic_auth send("crowd_application_name"), send("crowd_application_password")
87
88
  req.body="<password><value>#{send("protected_#{password_field}")}</value></password>"
88
89
  req.add_field 'Content-Type', 'text/xml'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authlogic_crowd_rest
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rob Di Marco