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 +23 -2
- data/VERSION +1 -1
- data/authlogic_crowd_rest.gemspec +1 -1
- data/lib/authlogic_crowd_rest/session.rb +4 -3
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -1,6 +1,27 @@
|
|
1
|
-
=
|
1
|
+
= Authlogic Plugin for Atlassian Crowd
|
2
2
|
|
3
|
-
|
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.
|
1
|
+
1.0.1
|
@@ -80,9 +80,10 @@ module AuthlogicCrowdRest
|
|
80
80
|
uri = URI.parse(send("crowd_base_url"))
|
81
81
|
|
82
82
|
begin
|
83
|
-
Net::HTTP.
|
84
|
-
|
85
|
-
|
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:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rob Di Marco
|