openstax_accounts 9.4.0 → 9.5.0
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 48ae6fdbc68368694770f436f5a7a4e57dea39b18c93b2791308aace6b07a02a
|
|
4
|
+
data.tar.gz: bbfbe2609b86b3b216ad0a94c7bf41b7c6bc1b29ea65e4a99388288dfcc80f7f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 29b93ef99bbb0ee170f4619269e79dd94fd89634a328985d55a057b9f0c85980480fdf8bfe47d4e946fb9dfc42e3a91c7e087a1825b8067c7c4a68d27e56f70f
|
|
7
|
+
data.tar.gz: dd689a226b1f8c92be65d8543c917b35af81eafa9a90f9de3b718fc2cf7b14e4df0ed7f64aff883bc2cf2141bfe1122dffadb9841a7cf0b1df9147e7b419779c
|
|
@@ -27,14 +27,18 @@ module OpenStax
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def destroy
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
# if a handler is configured, let it handle everything
|
|
31
|
+
if configuration.logout_handler
|
|
32
|
+
configuration.logout_handler.call(self)
|
|
33
|
+
else
|
|
34
|
+
# Unless we are stubbing, we redirect to a configurable URL, which is normally
|
|
35
|
+
# (or at least eventually) the Accounts logout URL so that users can't sign back
|
|
36
|
+
# in automagically.
|
|
37
|
+
sign_out!
|
|
38
|
+
redirect_to configuration.enable_stubbing? ?
|
|
39
|
+
main_app.root_url :
|
|
40
|
+
configuration.logout_redirect_url(request)
|
|
41
|
+
end
|
|
38
42
|
end
|
|
39
43
|
|
|
40
44
|
def failure
|
|
@@ -53,9 +53,16 @@ module OpenStax
|
|
|
53
53
|
# If more would be returned, the result will be empty instead
|
|
54
54
|
attr_accessor :max_search_items
|
|
55
55
|
|
|
56
|
+
# logout_handler
|
|
57
|
+
# Handles logging out and redirecting user when they've requested logout
|
|
58
|
+
# if specified, the logout_redirect_url has no effect
|
|
59
|
+
attr_accessor :logout_handler
|
|
60
|
+
|
|
56
61
|
# logout_redirect_url
|
|
57
62
|
# A URL to redirect to after the app logs out, can be a string or a Proc.
|
|
58
63
|
# If a Proc (or lambda), it will be called with the logout request.
|
|
64
|
+
#
|
|
65
|
+
# Only used if the logout_handler above is not specified
|
|
59
66
|
# If this field is nil or if the Proc returns nil, the logout will redirect
|
|
60
67
|
# to the default Accounts logout URL.
|
|
61
68
|
attr_writer :logout_redirect_url
|
|
@@ -117,6 +124,7 @@ module OpenStax
|
|
|
117
124
|
@account_user_mapper = OpenStax::Accounts::DefaultAccountUserMapper
|
|
118
125
|
@min_search_characters = 3
|
|
119
126
|
@max_search_items = 10
|
|
127
|
+
@logout_handler = nil
|
|
120
128
|
@logout_redirect_url = nil
|
|
121
129
|
@return_to_url_approver = nil
|
|
122
130
|
@forwardable_login_params = [
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openstax_accounts
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 9.
|
|
4
|
+
version: 9.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- JP Slavinsky
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-08-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|