sorcery-couchbase 0.1.3-java → 0.1.4-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee139db2d2f542b9bed01a0eab12c926f30cc756
4
- data.tar.gz: 3988f0e379260e47938c5cc6fbe249b50d73a5d8
3
+ metadata.gz: 3b47a3c1c25d59581f1409dccc4c2008700c7f28
4
+ data.tar.gz: c2a4b88c648a86fb9bc92a73f69f39c259cc9ec2
5
5
  SHA512:
6
- metadata.gz: 9e047bdc87cf7b0ca77ef4906dff1bce1fb18d452df87d2fd1a44a24a48aa0afcb7606dc6fd34beb89f9f6453a4930e9cafd9293dd4151f65d7f3027fdbf07fa
7
- data.tar.gz: 31deee6c447efd258f7c97076e55f381b8136f3569e4a04ccae33d41ac2fb29091e8b5f827fccbc7e5185069c16464648b42249bcb3a79eadead88d250a999c2
6
+ metadata.gz: 9f0f453a1d12416f8fb55551e0382186622f797ecf51ac1d1b735c16397ad8842d351dc48cc1811fdd0b9c05218cb872c8c9543f59552d28df7a170a2d2f1eab
7
+ data.tar.gz: dd86146b94fdfa4205cf6474673a91515781c88d237bc780ca6aac52487603a0f47bcea55382fe9e6bf6836e46254b4cb4b2245294fd75f0bcbc27acea2d5fea
@@ -89,6 +89,7 @@ module Sorcery
89
89
  attributes = sorcery_config.username_attribute_names
90
90
  attributes << sorcery_config.activation_token_attribute_name if sorcery_config.respond_to? :activation_token_attribute_name
91
91
  attributes << sorcery_config.remember_me_token_attribute_name if sorcery_config.respond_to? :remember_me_token_attribute_name
92
+ attributes << sorcery_config.reset_password_token_attribute_name if sorcery_config.respond_to? :reset_password_token_attribute_name
92
93
  attributes << sorcery_config.email_attribute_name
93
94
  attributes.uniq
94
95
  end
@@ -53,6 +53,10 @@ module Sorcery
53
53
  sorcery_view(sorcery_config.remember_me_token_attribute_name).fetch(key: token, stale: false).first
54
54
  end
55
55
 
56
+ def find_by_reset_password_token(token)
57
+ sorcery_view(sorcery_config.reset_password_token_attribute_name).fetch(key: token, stale: false).first
58
+ end
59
+
56
60
  def find_by_username(username)
57
61
  find_by_credentials(username)
58
62
  end
@@ -65,6 +69,11 @@ module Sorcery
65
69
  where(sorcery_config.email_attribute_name => email).first
66
70
  end
67
71
 
72
+ # add this method in order to be compatible with sorcery in reset_password
73
+ # see: https://github.com/NoamB/sorcery/blob/db47df2c448cbab1ef8fc68d81d697a84c9cd585/lib/sorcery/model/submodules/reset_password.rb#L119
74
+ def transaction(&blk)
75
+ tap(&blk)
76
+ end
68
77
  # def get_current_users
69
78
  # config = sorcery_config
70
79
  # where(config.last_activity_at_attribute_name.ne => nil) \
@@ -1,3 +1,3 @@
1
1
  module SorceryCouchbase
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorcery-couchbase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: java
6
6
  authors:
7
7
  - Mike Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-22 00:00:00.000000000 Z
11
+ date: 2014-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorcery
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  version: '0'
148
148
  requirements: []
149
149
  rubyforge_project:
150
- rubygems_version: 2.2.1
150
+ rubygems_version: 2.1.9
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: Couchbase backend for the Sorcery authentication framework