ae_easy-login 0.0.3 → 0.0.4
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 +4 -4
- data/CODE_OF_CONDUCT.md +1 -1
- data/Gemfile +1 -1
- data/LICENSE +1 -1
- data/README.md +2 -369
- data/Rakefile +0 -10
- data/ae_easy-login.gemspec +6 -12
- data/lib/ae_easy/login.rb +3 -8
- metadata +26 -75
- data/doc/AeEasy.html +0 -117
- data/doc/AeEasy/Login.html +0 -146
- data/doc/AeEasy/Login/Flow.html +0 -2589
- data/doc/AeEasy/Login/Plugin.html +0 -117
- data/doc/AeEasy/Login/Plugin/EnabledBehavior.html +0 -590
- data/doc/_index.html +0 -167
- data/doc/class_list.html +0 -51
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -58
- data/doc/css/style.css +0 -496
- data/doc/file.README.html +0 -514
- data/doc/file_list.html +0 -56
- data/doc/frames.html +0 -17
- data/doc/index.html +0 -514
- data/doc/js/app.js +0 -303
- data/doc/js/full_list.js +0 -216
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -291
- data/doc/top-level-namespace.html +0 -110
- data/lib/ae_easy/login/flow.rb +0 -297
- data/lib/ae_easy/login/plugin.rb +0 -8
- data/lib/ae_easy/login/plugin/enabled_behavior.rb +0 -47
- data/lib/ae_easy/login/version.rb +0 -6
data/lib/ae_easy/login/plugin.rb
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
module AeEasy
|
2
|
-
module Login
|
3
|
-
module Plugin
|
4
|
-
# Abstract module that provides a template with minimal common logic to
|
5
|
-
# implement a login flow enabled plugin.
|
6
|
-
# @abstract
|
7
|
-
module EnabledBehavior
|
8
|
-
include AeEasy::Core::Plugin::InitializeHook
|
9
|
-
|
10
|
-
# Login flow tool.
|
11
|
-
attr_reader :login_flow
|
12
|
-
|
13
|
-
# Hook to initialize login_flow configuration.
|
14
|
-
#
|
15
|
-
# @param [Hash] opts ({}) Configuration options (see
|
16
|
-
# AeEasy::Login::Flow#initialize_hook_login_flow).
|
17
|
-
def initialize_hook_login_plugin_enabled_behavior opts = {}
|
18
|
-
@login_flow = AeEasy::Login::Flow.new opts
|
19
|
-
end
|
20
|
-
|
21
|
-
# Generates a salt value based on the current page's login flow vars.
|
22
|
-
#
|
23
|
-
# @return [String]
|
24
|
-
def salt
|
25
|
-
old_cookie = page['vars'][login_flow.vars_key]
|
26
|
-
old_cookie = '' if old_cookie.nil?
|
27
|
-
Digest::SHA1.hexdigest old_cookie
|
28
|
-
end
|
29
|
-
|
30
|
-
# Validates that the current page's session hasn't expired.
|
31
|
-
#
|
32
|
-
# @return [Boolean] `true` when session is valid, else `false`.
|
33
|
-
def valid_session?
|
34
|
-
raise NotImplementedError.new('Must implement "session_valid?" function.')
|
35
|
-
end
|
36
|
-
|
37
|
-
# Fixes current page's session.
|
38
|
-
#
|
39
|
-
# @return [Boolean] `true` when session is valid and no need to fix,
|
40
|
-
# else `false`.
|
41
|
-
def fix_session
|
42
|
-
raise NotImplementedError.new('Must implement "fix_session" function.')
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|