authentasaurus 0.8.8 → 0.8.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELIST +2 -6
- data/TODO +0 -5
- data/app/controllers/areas_controller.rb +1 -1
- data/app/controllers/groups_controller.rb +1 -1
- data/app/controllers/permissions_controller.rb +1 -1
- data/app/controllers/recoveries_controller.rb +1 -1
- data/app/controllers/registrations_controller.rb +1 -1
- data/app/controllers/sessions_controller.rb +2 -2
- data/app/controllers/user_invitations_controller.rb +1 -1
- data/app/controllers/users_controller.rb +1 -1
- data/app/controllers/validations_controller.rb +1 -1
- data/app/models/area.rb +1 -1
- data/app/models/authentasaurus_emailer.rb +6 -6
- data/app/models/group.rb +1 -1
- data/app/models/permission.rb +1 -1
- data/app/models/recovery.rb +1 -1
- data/app/models/user_invitation.rb +1 -1
- data/app/models/validation.rb +1 -1
- data/app/views/authentasaurus_emailer/invitation_mail.html.erb +2 -2
- data/app/views/authentasaurus_emailer/recovery_mail.html.erb +2 -2
- data/app/views/authentasaurus_emailer/validation_mail.html.erb +2 -2
- data/lib/authentasaurus.rb +18 -52
- metadata +2 -136
- data/app/models/authentasaurus_session.rb +0 -3
- data/lib/authentasaurus/ac/acts_as_overrider.rb +0 -48
- data/lib/authentasaurus/ac/controllers/areas_controller.rb +0 -75
- data/lib/authentasaurus/ac/controllers/groups_controller.rb +0 -77
- data/lib/authentasaurus/ac/controllers/permissions_controller.rb +0 -76
- data/lib/authentasaurus/ac/controllers/recoveries_controller.rb +0 -67
- data/lib/authentasaurus/ac/controllers/registrations_controller.rb +0 -40
- data/lib/authentasaurus/ac/controllers/sessions_controller.rb +0 -57
- data/lib/authentasaurus/ac/controllers/user_invitations_controller.rb +0 -45
- data/lib/authentasaurus/ac/controllers/users_controller.rb +0 -75
- data/lib/authentasaurus/ac/controllers/validations_controller.rb +0 -48
- data/lib/authentasaurus/ac/routing.rb +0 -86
- data/lib/authentasaurus/ar/acts_as_authenticatable.rb +0 -107
- data/lib/authentasaurus/ar/acts_as_authenticatable_validatable.rb +0 -35
- data/lib/authentasaurus/ar/acts_as_overrider.rb +0 -49
- data/lib/authentasaurus/ar/authenticatable.rb +0 -64
- data/lib/authentasaurus/ar/migrations.rb +0 -165
- data/lib/authentasaurus/ar/models/recovery.rb +0 -34
- data/lib/authentasaurus/ar/models/session.rb +0 -78
- data/lib/authentasaurus/ar/models/user_invitation.rb +0 -30
- data/lib/authentasaurus/ar/models/validation.rb +0 -27
- data/lib/authentasaurus/arel/acts_as_authenticatable.rb +0 -67
- data/lib/authentasaurus/arel/authenticatable.rb +0 -21
- data/lib/authentasaurus/authorization.rb +0 -344
- data/lib/authentasaurus/configuration.rb +0 -30
- data/lib/authentasaurus/railtie.rb +0 -10
- data/lib/generators/authentasaurus/install/USAGE +0 -5
- data/lib/generators/authentasaurus/install/install_generator.rb +0 -10
- data/lib/generators/authentasaurus/install/templates/authentasaurus_tasks.rake +0 -48
- data/lib/generators/authentasaurus/install/templates/defaults.yml +0 -57
- data/lib/generators/authentasaurus/views/USAGE +0 -13
- data/lib/generators/authentasaurus/views/templates/areas/edit.html.erb +0 -7
- data/lib/generators/authentasaurus/views/templates/areas/index.html.erb +0 -11
- data/lib/generators/authentasaurus/views/templates/areas/new.html.erb +0 -7
- data/lib/generators/authentasaurus/views/templates/areas/show.html.erb +0 -7
- data/lib/generators/authentasaurus/views/templates/authentasaurus_emailer/invitation_mail.html.erb +0 -4
- data/lib/generators/authentasaurus/views/templates/authentasaurus_emailer/recovery_mail.html.erb +0 -7
- data/lib/generators/authentasaurus/views/templates/authentasaurus_emailer/validation_mail.html.erb +0 -6
- data/lib/generators/authentasaurus/views/templates/groups/edit.html.erb +0 -7
- data/lib/generators/authentasaurus/views/templates/groups/index.html.erb +0 -11
- data/lib/generators/authentasaurus/views/templates/groups/new.html.erb +0 -7
- data/lib/generators/authentasaurus/views/templates/groups/show.html.erb +0 -7
- data/lib/generators/authentasaurus/views/templates/permissions/edit.html.erb +0 -19
- data/lib/generators/authentasaurus/views/templates/permissions/index.html.erb +0 -17
- data/lib/generators/authentasaurus/views/templates/permissions/new.html.erb +0 -19
- data/lib/generators/authentasaurus/views/templates/permissions/show.html.erb +0 -7
- data/lib/generators/authentasaurus/views/templates/recoveries/edit.html.erb +0 -24
- data/lib/generators/authentasaurus/views/templates/recoveries/new.html.erb +0 -15
- data/lib/generators/authentasaurus/views/templates/registrations/new.html.erb +0 -21
- data/lib/generators/authentasaurus/views/templates/sessions/new.html.erb +0 -41
- data/lib/generators/authentasaurus/views/templates/sessions/no_access.html.erb +0 -1
- data/lib/generators/authentasaurus/views/templates/user_invitations/index.html.erb +0 -14
- data/lib/generators/authentasaurus/views/templates/user_invitations/new.html.erb +0 -9
- data/lib/generators/authentasaurus/views/templates/users/edit.html.erb +0 -27
- data/lib/generators/authentasaurus/views/templates/users/index.html.erb +0 -19
- data/lib/generators/authentasaurus/views/templates/users/new.html.erb +0 -27
- data/lib/generators/authentasaurus/views/templates/users/show.html.erb +0 -11
- data/lib/generators/authentasaurus/views/templates/validations/resend_validation_email.html.erb +0 -6
- data/lib/generators/authentasaurus/views/templates/validations/validate.html.erb +0 -6
- data/lib/generators/authentasaurus/views/views_generator.rb +0 -76
- data/rdoc/apple-touch-icon.png +0 -0
- data/rdoc/classes/Authentasaurus.html +0 -65
- data/rdoc/classes/Authentasaurus/Ac.html +0 -72
- data/rdoc/classes/Authentasaurus/Ac/ActsAsOverrider.html +0 -104
- data/rdoc/classes/Authentasaurus/Ac/ActsAsOverrider/ClassMethods.html +0 -397
- data/rdoc/classes/Authentasaurus/Ac/Routing.html +0 -61
- data/rdoc/classes/Authentasaurus/Ac/Routing/InstanceMethods.html +0 -390
- data/rdoc/classes/Authentasaurus/Ar.html +0 -77
- data/rdoc/classes/Authentasaurus/Ar/ActsAsAuthenticatable.html +0 -107
- data/rdoc/classes/Authentasaurus/Ar/ActsAsAuthenticatable/ClassMethods.html +0 -168
- data/rdoc/classes/Authentasaurus/Ar/ActsAsAuthenticatable/InstanceMethods.html +0 -357
- data/rdoc/classes/Authentasaurus/Ar/ActsAsAuthenticatableValidatable.html +0 -109
- data/rdoc/classes/Authentasaurus/Ar/ActsAsAuthenticatableValidatable/ClassMethods.html +0 -113
- data/rdoc/classes/Authentasaurus/Ar/ActsAsAuthenticatableValidatable/InstanceMethods.html +0 -54
- data/rdoc/classes/Authentasaurus/Ar/ActsAsOverrider.html +0 -104
- data/rdoc/classes/Authentasaurus/Ar/ActsAsOverrider/ClassMethods.html +0 -320
- data/rdoc/classes/Authentasaurus/Ar/Authenticatable.html +0 -104
- data/rdoc/classes/Authentasaurus/Ar/Authenticatable/ClassMethods.html +0 -182
- data/rdoc/classes/Authentasaurus/Ar/Migrations.html +0 -63
- data/rdoc/classes/Authentasaurus/Ar/Migrations/Columns.html +0 -68
- data/rdoc/classes/Authentasaurus/Ar/Migrations/Columns/InstanceMethods.html +0 -106
- data/rdoc/classes/Authentasaurus/Ar/Migrations/Tables.html +0 -68
- data/rdoc/classes/Authentasaurus/Ar/Migrations/Tables/InstanceMethods.html +0 -703
- data/rdoc/classes/Authentasaurus/Arel.html +0 -65
- data/rdoc/classes/Authentasaurus/Arel/ActsAsAuthenticatable.html +0 -107
- data/rdoc/classes/Authentasaurus/Arel/ActsAsAuthenticatable/ClassMethods.html +0 -139
- data/rdoc/classes/Authentasaurus/Arel/ActsAsAuthenticatable/InstanceMethods.html +0 -113
- data/rdoc/classes/Authentasaurus/Arel/Authenticatable.html +0 -105
- data/rdoc/classes/Authentasaurus/Arel/Authenticatable/ClassMethods.html +0 -119
- data/rdoc/classes/Authentasaurus/Authorization.html +0 -230
- data/rdoc/classes/Authentasaurus/Authorization/ActionController.html +0 -63
- data/rdoc/classes/Authentasaurus/Authorization/ActionController/ClassMethods.html +0 -263
- data/rdoc/classes/Authentasaurus/Authorization/ActionController/InstanceMethods.html +0 -54
- data/rdoc/classes/Authentasaurus/Authorization/ActionView.html +0 -54
- data/rdoc/classes/Authentasaurus/Authorization/CommonInstanceMethods.html +0 -240
- data/rdoc/created.rid +0 -1
- data/rdoc/css/main.css +0 -278
- data/rdoc/css/panel.css +0 -383
- data/rdoc/css/reset.css +0 -53
- data/rdoc/favicon.ico +0 -0
- data/rdoc/files/README_rdoc.html +0 -366
- data/rdoc/files/TODO.html +0 -64
- data/rdoc/files/lib/authentasaurus/ac/acts_as_overrider_rb.html +0 -52
- data/rdoc/files/lib/authentasaurus/ac/routing_rb.html +0 -60
- data/rdoc/files/lib/authentasaurus/ar/acts_as_authenticatable_rb.html +0 -52
- data/rdoc/files/lib/authentasaurus/ar/acts_as_authenticatable_validatable_rb.html +0 -52
- data/rdoc/files/lib/authentasaurus/ar/acts_as_overrider_rb.html +0 -52
- data/rdoc/files/lib/authentasaurus/ar/authenticatable_rb.html +0 -52
- data/rdoc/files/lib/authentasaurus/ar/migrations_rb.html +0 -52
- data/rdoc/files/lib/authentasaurus/arel/acts_as_authenticatable_rb.html +0 -52
- data/rdoc/files/lib/authentasaurus/arel/authenticatable_rb.html +0 -72
- data/rdoc/files/lib/authentasaurus/authorization_rb.html +0 -208
- data/rdoc/i/arrows.png +0 -0
- data/rdoc/i/results_bg.png +0 -0
- data/rdoc/i/tree_bg.png +0 -0
- data/rdoc/index.html +0 -15
- data/rdoc/js/jquery-1.3.2.min.js +0 -19
- data/rdoc/js/jquery-effect.js +0 -593
- data/rdoc/js/main.js +0 -22
- data/rdoc/js/searchdoc.js +0 -628
- data/rdoc/panel/index.html +0 -71
- data/rdoc/panel/search_index.js +0 -1
- data/rdoc/panel/tree.js +0 -1
@@ -1,65 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
-
<head>
|
6
|
-
<title>Authentasaurus::Arel</title>
|
7
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
|
-
<link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
|
9
|
-
<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
|
10
|
-
<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
|
11
|
-
<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
|
12
|
-
<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
|
13
|
-
</head>
|
14
|
-
|
15
|
-
<body>
|
16
|
-
<div class="banner">
|
17
|
-
<h1>
|
18
|
-
<span class="type">Module</span>
|
19
|
-
Authentasaurus::Arel
|
20
|
-
|
21
|
-
</h1>
|
22
|
-
<ul class="files">
|
23
|
-
|
24
|
-
<li><a href="../../files/lib/authentasaurus/arel/authenticatable_rb.html">lib/authentasaurus/arel/authenticatable.rb</a></li>
|
25
|
-
|
26
|
-
<li><a href="../../files/lib/authentasaurus/arel/acts_as_authenticatable_rb.html">lib/authentasaurus/arel/acts_as_authenticatable.rb</a></li>
|
27
|
-
|
28
|
-
</ul>
|
29
|
-
</div>
|
30
|
-
<div id="bodyContent">
|
31
|
-
<div id="content">
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<div class="sectiontitle">Classes and Modules</div>
|
48
|
-
<ul>
|
49
|
-
|
50
|
-
<li><span class="type">MODULE</span> <a href="Arel/ActsAsAuthenticatable.html">Authentasaurus::Arel::ActsAsAuthenticatable</a></li>
|
51
|
-
|
52
|
-
<li><span class="type">MODULE</span> <a href="Arel/Authenticatable.html">Authentasaurus::Arel::Authenticatable</a></li>
|
53
|
-
|
54
|
-
</ul>
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
</div>
|
63
|
-
</div>
|
64
|
-
</body>
|
65
|
-
</html>
|
@@ -1,107 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
-
<head>
|
6
|
-
<title>Authentasaurus::Arel::ActsAsAuthenticatable</title>
|
7
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
|
-
<link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" />
|
9
|
-
<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" />
|
10
|
-
<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
|
11
|
-
<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
|
12
|
-
<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script>
|
13
|
-
</head>
|
14
|
-
|
15
|
-
<body>
|
16
|
-
<div class="banner">
|
17
|
-
<h1>
|
18
|
-
<span class="type">Module</span>
|
19
|
-
Authentasaurus::Arel::ActsAsAuthenticatable
|
20
|
-
|
21
|
-
</h1>
|
22
|
-
<ul class="files">
|
23
|
-
|
24
|
-
<li><a href="../../../files/lib/authentasaurus/arel/acts_as_authenticatable_rb.html">lib/authentasaurus/arel/acts_as_authenticatable.rb</a></li>
|
25
|
-
|
26
|
-
</ul>
|
27
|
-
</div>
|
28
|
-
<div id="bodyContent">
|
29
|
-
<div id="content">
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
<div class="sectiontitle">Methods</div>
|
40
|
-
<dl class="methods">
|
41
|
-
|
42
|
-
<dt>I</dt>
|
43
|
-
<dd>
|
44
|
-
<ul>
|
45
|
-
|
46
|
-
<li><a href="#M000002">included</a></li>
|
47
|
-
|
48
|
-
</ul>
|
49
|
-
</dd>
|
50
|
-
|
51
|
-
</dl>
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
<div class="sectiontitle">Classes and Modules</div>
|
60
|
-
<ul>
|
61
|
-
|
62
|
-
<li><span class="type">MODULE</span> <a href="ActsAsAuthenticatable/ClassMethods.html">Authentasaurus::Arel::ActsAsAuthenticatable::ClassMethods</a></li>
|
63
|
-
|
64
|
-
<li><span class="type">MODULE</span> <a href="ActsAsAuthenticatable/InstanceMethods.html">Authentasaurus::Arel::ActsAsAuthenticatable::InstanceMethods</a></li>
|
65
|
-
|
66
|
-
</ul>
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
<div class="sectiontitle">Class Public methods</div>
|
75
|
-
|
76
|
-
<div class="method">
|
77
|
-
<div class="title" id="M000002">
|
78
|
-
|
79
|
-
<a name="M000002"></a><b>included</b>(base)
|
80
|
-
|
81
|
-
</div>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
<div class="sourcecode">
|
87
|
-
<p class="source-link">
|
88
|
-
Source: <a href="javascript:toggleSource('M000002_source')" id="l_M000002_source">show</a>
|
89
|
-
|
90
|
-
| <a href="http://github.com/cousine/Authentasuarus-2/blob/9f35019b78d87fdf386c9d64834171263868b8aa/lib/authentasaurus/arel/acts_as_authenticatable.rb#L3" target="_blank" class="github_url">on GitHub</a>
|
91
|
-
|
92
|
-
</p>
|
93
|
-
<div id="M000002_source" class="dyn-source">
|
94
|
-
<pre><span class="ruby-comment cmt"># File lib/authentasaurus/arel/acts_as_authenticatable.rb, line 3</span>
|
95
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">base</span>)
|
96
|
-
<span class="ruby-identifier">base</span>.<span class="ruby-identifier">send</span> <span class="ruby-identifier">:extend</span>, <span class="ruby-constant">ClassMethods</span>
|
97
|
-
<span class="ruby-identifier">base</span>.<span class="ruby-identifier">send</span> <span class="ruby-identifier">:include</span>, <span class="ruby-constant">InstanceMethods</span>
|
98
|
-
<span class="ruby-keyword kw">end</span></pre>
|
99
|
-
</div>
|
100
|
-
</div>
|
101
|
-
|
102
|
-
</div>
|
103
|
-
|
104
|
-
</div>
|
105
|
-
</div>
|
106
|
-
</body>
|
107
|
-
</html>
|
@@ -1,139 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
-
<head>
|
6
|
-
<title>Authentasaurus::Arel::ActsAsAuthenticatable::ClassMethods</title>
|
7
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
|
-
<link rel="stylesheet" href="../../../../css/reset.css" type="text/css" media="screen" />
|
9
|
-
<link rel="stylesheet" href="../../../../css/main.css" type="text/css" media="screen" />
|
10
|
-
<script src="../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
|
11
|
-
<script src="../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
|
12
|
-
<script src="../../../../js/main.js" type="text/javascript" charset="utf-8"></script>
|
13
|
-
</head>
|
14
|
-
|
15
|
-
<body>
|
16
|
-
<div class="banner">
|
17
|
-
<h1>
|
18
|
-
<span class="type">Module</span>
|
19
|
-
Authentasaurus::Arel::ActsAsAuthenticatable::ClassMethods
|
20
|
-
|
21
|
-
</h1>
|
22
|
-
<ul class="files">
|
23
|
-
|
24
|
-
<li><a href="../../../../files/lib/authentasaurus/arel/acts_as_authenticatable_rb.html">lib/authentasaurus/arel/acts_as_authenticatable.rb</a></li>
|
25
|
-
|
26
|
-
</ul>
|
27
|
-
</div>
|
28
|
-
<div id="bodyContent">
|
29
|
-
<div id="content">
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
<div class="sectiontitle">Methods</div>
|
40
|
-
<dl class="methods">
|
41
|
-
|
42
|
-
<dt>A</dt>
|
43
|
-
<dd>
|
44
|
-
<ul>
|
45
|
-
|
46
|
-
<li><a href="#M000003">authenticate</a></li>
|
47
|
-
|
48
|
-
</ul>
|
49
|
-
</dd>
|
50
|
-
|
51
|
-
</dl>
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
<div class="sectiontitle">Instance Public methods</div>
|
66
|
-
|
67
|
-
<div class="method">
|
68
|
-
<div class="title" id="M000003">
|
69
|
-
|
70
|
-
<a name="M000003"></a><b>authenticate</b>(username, password, remember = false)
|
71
|
-
|
72
|
-
</div>
|
73
|
-
|
74
|
-
<div class="description">
|
75
|
-
<p>
|
76
|
-
Authenticates the username and password
|
77
|
-
</p>
|
78
|
-
|
79
|
-
</div>
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
<div class="sourcecode">
|
85
|
-
<p class="source-link">
|
86
|
-
Source: <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show</a>
|
87
|
-
|
88
|
-
| <a href="http://github.com/cousine/Authentasuarus-2/blob/9f35019b78d87fdf386c9d64834171263868b8aa/lib/authentasaurus/arel/acts_as_authenticatable.rb#L10" target="_blank" class="github_url">on GitHub</a>
|
89
|
-
|
90
|
-
</p>
|
91
|
-
<div id="M000003_source" class="dyn-source">
|
92
|
-
<pre><span class="ruby-comment cmt"># File lib/authentasaurus/arel/acts_as_authenticatable.rb, line 10</span>
|
93
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">authenticate</span>(<span class="ruby-identifier">username</span>, <span class="ruby-identifier">password</span>, <span class="ruby-identifier">remember</span> = <span class="ruby-keyword kw">false</span>)
|
94
|
-
<span class="ruby-keyword kw">case</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">format</span>)
|
95
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">ActiveResource</span><span class="ruby-operator">::</span><span class="ruby-constant">Formats</span><span class="ruby-operator">::</span><span class="ruby-constant">XmlFormat</span>
|
96
|
-
<span class="ruby-identifier">user</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">from_xml</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">:signin</span>,<span class="ruby-identifier">:username</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">username</span>, <span class="ruby-identifier">:password</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">password</span>, <span class="ruby-identifier">:remember</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">remember</span>).<span class="ruby-identifier">body</span>).<span class="ruby-identifier">values</span>.<span class="ruby-identifier">first</span>
|
97
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">ActiveResource</span><span class="ruby-operator">::</span><span class="ruby-constant">Formats</span><span class="ruby-operator">::</span><span class="ruby-constant">JsonFormat</span>
|
98
|
-
<span class="ruby-identifier">user</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span> <span class="ruby-constant">ActiveSupport</span><span class="ruby-operator">::</span><span class="ruby-constant">JSON</span>.<span class="ruby-identifier">decode</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">:signin</span>,<span class="ruby-identifier">:username</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">username</span>, <span class="ruby-identifier">:password</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">password</span>, <span class="ruby-identifier">:remember</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">remember</span>).<span class="ruby-identifier">body</span>).<span class="ruby-identifier">first</span>
|
99
|
-
<span class="ruby-keyword kw">else</span>
|
100
|
-
<span class="ruby-identifier">user</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">from_xml</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">:signin</span>,<span class="ruby-identifier">:username</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">username</span>, <span class="ruby-identifier">:password</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">password</span>, <span class="ruby-identifier">:remember</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">remember</span>).<span class="ruby-identifier">body</span>).<span class="ruby-identifier">values</span>.<span class="ruby-identifier">first</span>
|
101
|
-
<span class="ruby-keyword kw">end</span>
|
102
|
-
|
103
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">nil?</span>
|
104
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sync</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sync_to</span>.<span class="ruby-identifier">nil?</span>
|
105
|
-
<span class="ruby-identifier">last_update</span> = <span class="ruby-identifier">user</span>.<span class="ruby-identifier">attributes</span>.<span class="ruby-identifier">delete</span> <span class="ruby-value str">"updated_at"</span>
|
106
|
-
<span class="ruby-identifier">local_user</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sync_to</span>.<span class="ruby-identifier">find_or_initialize_by_username</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">username</span>, <span class="ruby-identifier">user</span>.<span class="ruby-identifier">attributes</span>
|
107
|
-
|
108
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">local_user</span>.<span class="ruby-identifier">new_record?</span>
|
109
|
-
<span class="ruby-identifier">last_update_datetime</span> = (<span class="ruby-identifier">last_update</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">String</span>)) <span class="ruby-operator">?</span> (<span class="ruby-constant">DateTime</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">last_update</span>)) <span class="ruby-operator">:</span> (<span class="ruby-identifier">last_update</span>)
|
110
|
-
|
111
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">local_user</span>.<span class="ruby-identifier">updated_at</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">last_update_datetime</span>
|
112
|
-
<span class="ruby-identifier">local_user</span>.<span class="ruby-identifier">update_attributes</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">attributes</span>
|
113
|
-
<span class="ruby-keyword kw">end</span>
|
114
|
-
<span class="ruby-keyword kw">else</span>
|
115
|
-
<span class="ruby-identifier">local_user</span>.<span class="ruby-identifier">password</span> = <span class="ruby-identifier">password</span>
|
116
|
-
<span class="ruby-identifier">local_user</span>.<span class="ruby-identifier">password_confirmation</span> = <span class="ruby-identifier">password</span>
|
117
|
-
|
118
|
-
<span class="ruby-identifier">local_user</span>.<span class="ruby-identifier">hashed_password</span> = <span class="ruby-identifier">user</span>.<span class="ruby-identifier">hashed_password</span>
|
119
|
-
<span class="ruby-identifier">local_user</span>.<span class="ruby-identifier">password_seed</span> = <span class="ruby-identifier">user</span>.<span class="ruby-identifier">password_seed</span>
|
120
|
-
|
121
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sync_to</span>.<span class="ruby-identifier">default_data</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>,<span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
122
|
-
<span class="ruby-identifier">local_user</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'='</span>, <span class="ruby-identifier">value</span>)
|
123
|
-
<span class="ruby-keyword kw">end</span>
|
124
|
-
|
125
|
-
<span class="ruby-identifier">local_user</span>.<span class="ruby-identifier">save</span>
|
126
|
-
<span class="ruby-keyword kw">end</span>
|
127
|
-
<span class="ruby-keyword kw">end</span>
|
128
|
-
<span class="ruby-keyword kw">end</span>
|
129
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">user</span>
|
130
|
-
<span class="ruby-keyword kw">end</span></pre>
|
131
|
-
</div>
|
132
|
-
</div>
|
133
|
-
|
134
|
-
</div>
|
135
|
-
|
136
|
-
</div>
|
137
|
-
</div>
|
138
|
-
</body>
|
139
|
-
</html>
|
@@ -1,113 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
-
<head>
|
6
|
-
<title>Authentasaurus::Arel::ActsAsAuthenticatable::InstanceMethods</title>
|
7
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
|
-
<link rel="stylesheet" href="../../../../css/reset.css" type="text/css" media="screen" />
|
9
|
-
<link rel="stylesheet" href="../../../../css/main.css" type="text/css" media="screen" />
|
10
|
-
<script src="../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
|
11
|
-
<script src="../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
|
12
|
-
<script src="../../../../js/main.js" type="text/javascript" charset="utf-8"></script>
|
13
|
-
</head>
|
14
|
-
|
15
|
-
<body>
|
16
|
-
<div class="banner">
|
17
|
-
<h1>
|
18
|
-
<span class="type">Module</span>
|
19
|
-
Authentasaurus::Arel::ActsAsAuthenticatable::InstanceMethods
|
20
|
-
|
21
|
-
</h1>
|
22
|
-
<ul class="files">
|
23
|
-
|
24
|
-
<li><a href="../../../../files/lib/authentasaurus/arel/acts_as_authenticatable_rb.html">lib/authentasaurus/arel/acts_as_authenticatable.rb</a></li>
|
25
|
-
|
26
|
-
</ul>
|
27
|
-
</div>
|
28
|
-
<div id="bodyContent">
|
29
|
-
<div id="content">
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
<div class="sectiontitle">Methods</div>
|
40
|
-
<dl class="methods">
|
41
|
-
|
42
|
-
<dt>S</dt>
|
43
|
-
<dd>
|
44
|
-
<ul>
|
45
|
-
|
46
|
-
<li><a href="#M000004">sync</a></li>
|
47
|
-
|
48
|
-
</ul>
|
49
|
-
</dd>
|
50
|
-
|
51
|
-
</dl>
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
<div class="sectiontitle">Instance Public methods</div>
|
66
|
-
|
67
|
-
<div class="method">
|
68
|
-
<div class="title" id="M000004">
|
69
|
-
|
70
|
-
<a name="M000004"></a><b>sync</b>()
|
71
|
-
|
72
|
-
</div>
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
<div class="sourcecode">
|
78
|
-
<p class="source-link">
|
79
|
-
Source: <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show</a>
|
80
|
-
|
81
|
-
| <a href="http://github.com/cousine/Authentasuarus-2/blob/9f35019b78d87fdf386c9d64834171263868b8aa/lib/authentasaurus/arel/acts_as_authenticatable.rb#L51" target="_blank" class="github_url">on GitHub</a>
|
82
|
-
|
83
|
-
</p>
|
84
|
-
<div id="M000004_source" class="dyn-source">
|
85
|
-
<pre><span class="ruby-comment cmt"># File lib/authentasaurus/arel/acts_as_authenticatable.rb, line 51</span>
|
86
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sync</span>
|
87
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">sync</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">sync_to</span>.<span class="ruby-identifier">nil?</span>
|
88
|
-
<span class="ruby-identifier">user</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>
|
89
|
-
<span class="ruby-identifier">last_update</span> = <span class="ruby-identifier">user</span>.<span class="ruby-identifier">attributes</span>.<span class="ruby-identifier">delete</span> <span class="ruby-value str">"updated_at"</span>
|
90
|
-
<span class="ruby-identifier">local_user</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">sync_to</span>.<span class="ruby-identifier">find_or_initialize_by_username</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">username</span>, <span class="ruby-identifier">user</span>.<span class="ruby-identifier">attributes</span>
|
91
|
-
|
92
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">local_user</span>.<span class="ruby-identifier">new_record?</span>
|
93
|
-
<span class="ruby-identifier">local_user</span>.<span class="ruby-identifier">update_attributes</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">attributes</span>
|
94
|
-
<span class="ruby-keyword kw">else</span>
|
95
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sync_to</span>.<span class="ruby-identifier">default_data</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>,<span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
96
|
-
<span class="ruby-identifier">local_user</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'='</span>, <span class="ruby-identifier">value</span>)
|
97
|
-
<span class="ruby-keyword kw">end</span>
|
98
|
-
|
99
|
-
<span class="ruby-identifier">local_user</span>.<span class="ruby-identifier">save</span>
|
100
|
-
<span class="ruby-keyword kw">end</span>
|
101
|
-
<span class="ruby-keyword kw">else</span>
|
102
|
-
<span class="ruby-keyword kw">false</span>
|
103
|
-
<span class="ruby-keyword kw">end</span>
|
104
|
-
<span class="ruby-keyword kw">end</span></pre>
|
105
|
-
</div>
|
106
|
-
</div>
|
107
|
-
|
108
|
-
</div>
|
109
|
-
|
110
|
-
</div>
|
111
|
-
</div>
|
112
|
-
</body>
|
113
|
-
</html>
|
@@ -1,105 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
-
<head>
|
6
|
-
<title>Authentasaurus::Arel::Authenticatable</title>
|
7
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
|
-
<link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" />
|
9
|
-
<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" />
|
10
|
-
<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
|
11
|
-
<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
|
12
|
-
<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script>
|
13
|
-
</head>
|
14
|
-
|
15
|
-
<body>
|
16
|
-
<div class="banner">
|
17
|
-
<h1>
|
18
|
-
<span class="type">Module</span>
|
19
|
-
Authentasaurus::Arel::Authenticatable
|
20
|
-
|
21
|
-
</h1>
|
22
|
-
<ul class="files">
|
23
|
-
|
24
|
-
<li><a href="../../../files/lib/authentasaurus/arel/authenticatable_rb.html">lib/authentasaurus/arel/authenticatable.rb</a></li>
|
25
|
-
|
26
|
-
</ul>
|
27
|
-
</div>
|
28
|
-
<div id="bodyContent">
|
29
|
-
<div id="content">
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
<div class="sectiontitle">Methods</div>
|
40
|
-
<dl class="methods">
|
41
|
-
|
42
|
-
<dt>I</dt>
|
43
|
-
<dd>
|
44
|
-
<ul>
|
45
|
-
|
46
|
-
<li><a href="#M000000">included</a></li>
|
47
|
-
|
48
|
-
</ul>
|
49
|
-
</dd>
|
50
|
-
|
51
|
-
</dl>
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
<div class="sectiontitle">Classes and Modules</div>
|
60
|
-
<ul>
|
61
|
-
|
62
|
-
<li><span class="type">MODULE</span> <a href="Authenticatable/ClassMethods.html">Authentasaurus::Arel::Authenticatable::ClassMethods</a></li>
|
63
|
-
|
64
|
-
</ul>
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
<div class="sectiontitle">Class Public methods</div>
|
73
|
-
|
74
|
-
<div class="method">
|
75
|
-
<div class="title" id="M000000">
|
76
|
-
|
77
|
-
<a name="M000000"></a><b>included</b>(base)
|
78
|
-
|
79
|
-
</div>
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
<div class="sourcecode">
|
85
|
-
<p class="source-link">
|
86
|
-
Source: <a href="javascript:toggleSource('M000000_source')" id="l_M000000_source">show</a>
|
87
|
-
|
88
|
-
| <a href="http://github.com/cousine/Authentasuarus-2/blob/9f35019b78d87fdf386c9d64834171263868b8aa/lib/authentasaurus/arel/authenticatable.rb#L3" target="_blank" class="github_url">on GitHub</a>
|
89
|
-
|
90
|
-
</p>
|
91
|
-
<div id="M000000_source" class="dyn-source">
|
92
|
-
<pre><span class="ruby-comment cmt"># File lib/authentasaurus/arel/authenticatable.rb, line 3</span>
|
93
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">base</span>)
|
94
|
-
<span class="ruby-identifier">base</span>.<span class="ruby-identifier">send</span> <span class="ruby-identifier">:extend</span>, <span class="ruby-constant">ClassMethods</span>
|
95
|
-
|
96
|
-
<span class="ruby-keyword kw">end</span></pre>
|
97
|
-
</div>
|
98
|
-
</div>
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
</div>
|
103
|
-
</div>
|
104
|
-
</body>
|
105
|
-
</html>
|