devise-jira-authenticable 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/lib/devise/jira_authenticable/version.rb +1 -1
- data/lib/devise/models/jira_authenticable.rb +2 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0841c79636ea594b8f5b8d79bb2d86ad3933482
|
4
|
+
data.tar.gz: 9d51a3baf75e08986d60d771039dbfee628215a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 392ae4cbd6da39b4e58a1d0dc428753aeb48413f31a03f26aac3a3baa7179e21bf7a85d3f63dca4cf67023a81a5525530558f6e69fec7eae1d80d86ffc455afc
|
7
|
+
data.tar.gz: e4f664f4fd6a8eb569a7755124744d9fd7270abb30bb9d5e621e2f1751fa64e722b82b22ae22c6c2844ea5b247a66f7c8837e537832faf080156e5d9b2004d4b
|
data/README.md
CHANGED
@@ -2,9 +2,15 @@
|
|
2
2
|
|
3
3
|
This provides a mechanism to allow devise to authenticate using a JIRA instance. It integrates with the jira-ruby.gem. Even if you intend only to use a `jira-authenticable` strategy within Devise, I suggest starting by getting Devise going with the `database-authenticable` strategy.
|
4
4
|
|
5
|
-
|
6
5
|
The following instructions assume that you want to use the `jira-authenticable strategy` alongside another strategy such as `database-authenticatable`.
|
7
6
|
|
7
|
+
> I had originally designed jira-authenticable to work both standalone and in conjunction
|
8
|
+
> with database_authenticatable. However, I have run into an issue. In standalone mode
|
9
|
+
> my user model needs to define a password method that is used elsewhere. However, if
|
10
|
+
> I define a password method it may overwrite the password method defined by the
|
11
|
+
> database_authenticatable strategy. So a no-win situation. For now, please use the two
|
12
|
+
> strategies together.
|
13
|
+
|
8
14
|
## Devise Preparation
|
9
15
|
|
10
16
|
As JIRA uses usernames rather than email addresses for login credentials I would also make the changes to your app to use a username within Devise before adding adding this Gem. That way you can test that you have successfully implemented the user authentication before worrying about the JIRA interface.
|
@@ -41,7 +41,6 @@ module Devise
|
|
41
41
|
|
42
42
|
included do
|
43
43
|
attr_accessor :jira_client
|
44
|
-
attr_accessor :password
|
45
44
|
end
|
46
45
|
|
47
46
|
# Use the currently configured JIRA server to attempt to authenticate the
|
@@ -52,7 +51,7 @@ module Devise
|
|
52
51
|
# Parameters::
|
53
52
|
# * +username+: The username to send to the radius server
|
54
53
|
# * +password+: The password to send to the radius server
|
55
|
-
def valid_jira_password?(
|
54
|
+
def valid_jira_password?(password)
|
56
55
|
self.jira_client = JIRA::Client.new(
|
57
56
|
username: username,
|
58
57
|
password: password,
|
@@ -82,7 +81,7 @@ module Devise
|
|
82
81
|
|
83
82
|
resource = find_for_authentication( username: username )
|
84
83
|
|
85
|
-
resource&.valid_jira_password?(
|
84
|
+
resource&.valid_jira_password?(password) ? resource : nil
|
86
85
|
end
|
87
86
|
end
|
88
87
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-jira-authenticable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- trapeze.bell.peter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|
@@ -296,7 +296,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
296
296
|
version: '0'
|
297
297
|
requirements: []
|
298
298
|
rubyforge_project:
|
299
|
-
rubygems_version: 2.6.
|
299
|
+
rubygems_version: 2.6.13
|
300
300
|
signing_key:
|
301
301
|
specification_version: 4
|
302
302
|
summary: Provide Devise authentication using a JIRA instance.
|