devise-security 0.14.2 → 0.14.3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18a1162386aaffc07faded355851e3536733160c505ac8444ba4ce2e4e28cd1f
|
4
|
+
data.tar.gz: 6ab4953ad5fcb9d9c223bcac1d58e2596e492fbc3f118619ebd7f55b757079f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be02504cf8b1c576fb98a62ddb24da42777998613664fa773436b517ef2b8962d9f1d8aa1f31312b5b265b07e21e1b6896dafbfbcf582ba8fdafc2a1182e6516
|
7
|
+
data.tar.gz: 9c4aa899e5cfd71562dd472a5fae04033706299536b3423af6dd523083962c522c4287f97ba46878ff489b8d0e78f601bac0600db23d73cc59a5baf77ac9a458
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative 'compatibility'
|
3
4
|
require 'devise-security/hooks/session_limitable'
|
4
5
|
|
5
6
|
module Devise
|
@@ -11,6 +12,7 @@ module Devise
|
|
11
12
|
# someone used his credentials to sign in.
|
12
13
|
module SessionLimitable
|
13
14
|
extend ActiveSupport::Concern
|
15
|
+
include Devise::Models::Compatibility
|
14
16
|
|
15
17
|
# Update the unique_session_id on the model. This will be checked in
|
16
18
|
# the Warden after_set_user hook in {file:devise-security/hooks/session_limitable}
|
@@ -2,6 +2,15 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class TestSessionLimitable < ActiveSupport::TestCase
|
4
4
|
|
5
|
+
class SessionLimitableUser < User
|
6
|
+
devise :session_limitable
|
7
|
+
include ::Mongoid::Mappings if DEVISE_ORM == :mongoid
|
8
|
+
end
|
9
|
+
|
10
|
+
test 'includes Devise::Models::Compatibility' do
|
11
|
+
assert_kind_of(Devise::Models::Compatibility, SessionLimitableUser.new)
|
12
|
+
end
|
13
|
+
|
5
14
|
test '#update_unique_session_id!(value) updates valid record' do
|
6
15
|
user = User.create! password: 'passWord1', password_confirmation: 'passWord1', email: 'bob@microsoft.com'
|
7
16
|
assert user.persisted?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-security
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marco Scholl
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2019-05-
|
15
|
+
date: 2019-05-26 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|