camping-oauth 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +3 -0
- data/doc/classes/CampingOAuthConsumer.html +145 -0
- data/doc/classes/CampingOAuthConsumer.src/M000041.html +19 -0
- data/doc/classes/CampingOAuthConsumer/Controllers.html +116 -0
- data/doc/classes/CampingOAuthConsumer/Controllers/AccessToken.html +137 -0
- data/doc/classes/CampingOAuthConsumer/Controllers/AccessToken.src/M000051.html +32 -0
- data/doc/classes/CampingOAuthConsumer/Controllers/AccessTokenAuthorized.html +137 -0
- data/doc/classes/CampingOAuthConsumer/Controllers/AccessTokenAuthorized.src/M000050.html +20 -0
- data/doc/classes/CampingOAuthConsumer/Controllers/AuthorizeToken.html +137 -0
- data/doc/classes/CampingOAuthConsumer/Controllers/AuthorizeToken.src/M000048.html +24 -0
- data/doc/classes/CampingOAuthConsumer/Controllers/GetTimeNow.html +137 -0
- data/doc/classes/CampingOAuthConsumer/Controllers/GetTimeNow.src/M000049.html +28 -0
- data/doc/classes/CampingOAuthConsumer/Controllers/Index.html +137 -0
- data/doc/classes/CampingOAuthConsumer/Controllers/Index.src/M000046.html +18 -0
- data/doc/classes/CampingOAuthConsumer/Controllers/RequestToken.html +137 -0
- data/doc/classes/CampingOAuthConsumer/Controllers/RequestToken.src/M000047.html +24 -0
- data/doc/classes/CampingOAuthConsumer/Views.html +176 -0
- data/doc/classes/CampingOAuthConsumer/Views.src/M000042.html +42 -0
- data/doc/classes/CampingOAuthConsumer/Views.src/M000043.html +41 -0
- data/doc/classes/CampingOAuthConsumer/Views.src/M000044.html +18 -0
- data/doc/classes/CampingOAuthConsumer/Views.src/M000045.html +19 -0
- data/doc/classes/CampingOAuthProvider.html +149 -0
- data/doc/classes/CampingOAuthProvider.src/M000052.html +23 -0
- data/doc/classes/CampingOAuthProvider/Controllers.html +113 -0
- data/doc/classes/CampingOAuthProvider/Controllers/APITimeNow.html +137 -0
- data/doc/classes/CampingOAuthProvider/Controllers/APITimeNow.src/M000058.html +23 -0
- data/doc/classes/CampingOAuthProvider/Controllers/Index.html +137 -0
- data/doc/classes/CampingOAuthProvider/Controllers/Index.src/M000055.html +18 -0
- data/doc/classes/CampingOAuthProvider/Controllers/Login.html +152 -0
- data/doc/classes/CampingOAuthProvider/Controllers/Login.src/M000056.html +18 -0
- data/doc/classes/CampingOAuthProvider/Controllers/Login.src/M000057.html +33 -0
- data/doc/classes/CampingOAuthProvider/Helpers.html +112 -0
- data/doc/classes/CampingOAuthProvider/Models.html +119 -0
- data/doc/classes/CampingOAuthProvider/Models/CreateUserSchema.html +152 -0
- data/doc/classes/CampingOAuthProvider/Models/CreateUserSchema.src/M000059.html +26 -0
- data/doc/classes/CampingOAuthProvider/Models/CreateUserSchema.src/M000060.html +19 -0
- data/doc/classes/CampingOAuthProvider/Models/User.html +111 -0
- data/doc/classes/CampingOAuthProvider/Views.html +146 -0
- data/doc/classes/CampingOAuthProvider/Views.src/M000053.html +19 -0
- data/doc/classes/CampingOAuthProvider/Views.src/M000054.html +27 -0
- data/doc/classes/OAuth.html +107 -0
- data/doc/classes/OAuth/RequestProxy.html +112 -0
- data/doc/classes/OAuth/RequestProxy/Base.html +153 -0
- data/doc/classes/OAuth/RequestProxy/Base.src/M000039.html +28 -0
- data/doc/classes/OAuth/RequestProxy/Base.src/M000040.html +28 -0
- data/doc/classes/OAuth/RequestProxy/RackRequest.html +143 -0
- data/doc/classes/OAuth/RequestProxy/RackRequest.src/M000039.html +18 -0
- data/doc/classes/OAuthCampingPlugin.html +188 -0
- data/doc/classes/OAuthCampingPlugin.src/M000001.html +18 -0
- data/doc/classes/OAuthCampingPlugin.src/M000002.html +18 -0
- data/doc/classes/OAuthCampingPlugin.src/M000003.html +17 -0
- data/doc/classes/OAuthCampingPlugin/Controllers.html +191 -0
- data/doc/classes/OAuthCampingPlugin/Controllers.src/M000024.html +18 -0
- data/doc/classes/OAuthCampingPlugin/Controllers.src/M000025.html +26 -0
- data/doc/classes/OAuthCampingPlugin/Filters.html +161 -0
- data/doc/classes/OAuthCampingPlugin/Filters.src/M000034.html +34 -0
- data/doc/classes/OAuthCampingPlugin/Helpers.html +283 -0
- data/doc/classes/OAuthCampingPlugin/Helpers.src/M000026.html +18 -0
- data/doc/classes/OAuthCampingPlugin/Helpers.src/M000027.html +19 -0
- data/doc/classes/OAuthCampingPlugin/Helpers.src/M000028.html +20 -0
- data/doc/classes/OAuthCampingPlugin/Helpers.src/M000029.html +20 -0
- data/doc/classes/OAuthCampingPlugin/Helpers.src/M000030.html +18 -0
- data/doc/classes/OAuthCampingPlugin/Helpers.src/M000031.html +18 -0
- data/doc/classes/OAuthCampingPlugin/Helpers.src/M000032.html +20 -0
- data/doc/classes/OAuthCampingPlugin/Helpers.src/M000033.html +20 -0
- data/doc/classes/OAuthCampingPlugin/Models.html +219 -0
- data/doc/classes/OAuthCampingPlugin/Models.src/M000035.html +55 -0
- data/doc/classes/OAuthCampingPlugin/Models.src/M000036.html +31 -0
- data/doc/classes/OAuthCampingPlugin/Models.src/M000037.html +56 -0
- data/doc/classes/OAuthCampingPlugin/Models.src/M000038.html +22 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.html +407 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000004.html +18 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000005.html +18 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000006.html +20 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000007.html +20 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000008.html +20 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000009.html +24 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000010.html +20 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000011.html +18 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000012.html +19 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000013.html +26 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000014.html +26 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000015.html +33 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000016.html +18 -0
- data/doc/classes/OAuthCampingPlugin/OAuth.src/M000017.html +18 -0
- data/doc/classes/OAuthCampingPlugin/Views.html +257 -0
- data/doc/classes/OAuthCampingPlugin/Views.src/M000018.html +18 -0
- data/doc/classes/OAuthCampingPlugin/Views.src/M000019.html +18 -0
- data/doc/classes/OAuthCampingPlugin/Views.src/M000020.html +18 -0
- data/doc/classes/OAuthCampingPlugin/Views.src/M000021.html +18 -0
- data/doc/classes/OAuthCampingPlugin/Views.src/M000022.html +18 -0
- data/doc/classes/OAuthCampingPlugin/Views.src/M000023.html +41 -0
- data/doc/created.rid +1 -0
- data/doc/files/examples/camping-oauth-consumer/camping-oauth-consumer_rb.html +124 -0
- data/doc/files/examples/camping-oauth-provider/camping-oauth-provider_rb.html +101 -0
- data/doc/files/lib/camping-oauth_rb.html +576 -0
- data/doc/fr_class_index.html +56 -0
- data/doc/fr_file_index.html +29 -0
- data/doc/fr_method_index.html +86 -0
- data/doc/index.html +24 -0
- data/lib/camping-oauth.rb +1078 -0
- metadata +172 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>get (CampingOAuthProvider::Controllers::APITimeNow)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File examples/camping-oauth-provider/camping-oauth-provider.rb, line 118</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>
|
15
|
+
<span class="ruby-ivar">@result</span> = {<span class="ruby-identifier">:now=</span><span class="ruby-operator">></span><span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">utc</span>.<span class="ruby-identifier">to_s</span>}
|
16
|
+
<span class="ruby-ivar">@result</span>[<span class="ruby-identifier">:username</span>] = <span class="ruby-ivar">@user</span>.<span class="ruby-identifier">username</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@user</span>
|
17
|
+
|
18
|
+
<span class="ruby-ivar">@headers</span>[<span class="ruby-value str">'Content-Type'</span>] = <span class="ruby-value str">"application/json"</span>
|
19
|
+
<span class="ruby-identifier">log_debug</span> <span class="ruby-ivar">@result</span>.<span class="ruby-identifier">to_json</span>
|
20
|
+
<span class="ruby-ivar">@result</span>.<span class="ruby-identifier">to_json</span>
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -0,0 +1,137 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: CampingOAuthProvider::Controllers::Index</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">CampingOAuthProvider::Controllers::Index</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/examples/camping-oauth-provider/camping-oauth-provider_rb.html">
|
59
|
+
examples/camping-oauth-provider/camping-oauth-provider.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000055">get</a>
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<!-- if includes -->
|
97
|
+
|
98
|
+
<div id="section">
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
<!-- if method_list -->
|
108
|
+
<div id="methods">
|
109
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
110
|
+
|
111
|
+
<div id="method-M000055" class="method-detail">
|
112
|
+
<a name="M000055"></a>
|
113
|
+
|
114
|
+
<div class="method-heading">
|
115
|
+
<a href="Index.src/M000055.html" target="Code" class="method-signature"
|
116
|
+
onclick="popupCode('Index.src/M000055.html');return false;">
|
117
|
+
<span class="method-name">get</span><span class="method-args">()</span>
|
118
|
+
</a>
|
119
|
+
</div>
|
120
|
+
|
121
|
+
<div class="method-description">
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
|
126
|
+
</div>
|
127
|
+
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
|
132
|
+
<div id="validator-badges">
|
133
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
</body>
|
137
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>get (CampingOAuthProvider::Controllers::Index)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File examples/camping-oauth-provider/camping-oauth-provider.rb, line 87</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>
|
15
|
+
<span class="ruby-identifier">render</span> <span class="ruby-identifier">:index</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,152 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: CampingOAuthProvider::Controllers::Login</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">CampingOAuthProvider::Controllers::Login</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/examples/camping-oauth-provider/camping-oauth-provider_rb.html">
|
59
|
+
examples/camping-oauth-provider/camping-oauth-provider.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
R'/login'
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000056">get</a>
|
90
|
+
<a href="#M000057">post</a>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
|
97
|
+
<!-- if includes -->
|
98
|
+
|
99
|
+
<div id="section">
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<!-- if method_list -->
|
109
|
+
<div id="methods">
|
110
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
111
|
+
|
112
|
+
<div id="method-M000056" class="method-detail">
|
113
|
+
<a name="M000056"></a>
|
114
|
+
|
115
|
+
<div class="method-heading">
|
116
|
+
<a href="Login.src/M000056.html" target="Code" class="method-signature"
|
117
|
+
onclick="popupCode('Login.src/M000056.html');return false;">
|
118
|
+
<span class="method-name">get</span><span class="method-args">()</span>
|
119
|
+
</a>
|
120
|
+
</div>
|
121
|
+
|
122
|
+
<div class="method-description">
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
<div id="method-M000057" class="method-detail">
|
127
|
+
<a name="M000057"></a>
|
128
|
+
|
129
|
+
<div class="method-heading">
|
130
|
+
<a href="Login.src/M000057.html" target="Code" class="method-signature"
|
131
|
+
onclick="popupCode('Login.src/M000057.html');return false;">
|
132
|
+
<span class="method-name">post</span><span class="method-args">()</span>
|
133
|
+
</a>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
<div class="method-description">
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
|
140
|
+
|
141
|
+
</div>
|
142
|
+
|
143
|
+
|
144
|
+
</div>
|
145
|
+
|
146
|
+
|
147
|
+
<div id="validator-badges">
|
148
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
149
|
+
</div>
|
150
|
+
|
151
|
+
</body>
|
152
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>get (CampingOAuthProvider::Controllers::Login)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File examples/camping-oauth-provider/camping-oauth-provider.rb, line 93</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>
|
15
|
+
<span class="ruby-identifier">render</span> <span class="ruby-identifier">:login</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>post (CampingOAuthProvider::Controllers::Login)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File examples/camping-oauth-provider/camping-oauth-provider.rb, line 97</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span>
|
15
|
+
<span class="ruby-ivar">@user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find_by_username_and_password</span>(<span class="ruby-identifier">input</span>.<span class="ruby-identifier">username</span>, <span class="ruby-identifier">input</span>.<span class="ruby-identifier">password</span>)
|
16
|
+
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@user</span>
|
18
|
+
<span class="ruby-ivar">@state</span>.<span class="ruby-identifier">user_id</span> = <span class="ruby-ivar">@user</span>.<span class="ruby-identifier">id</span>
|
19
|
+
|
20
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@state</span>.<span class="ruby-identifier">return_to</span>.<span class="ruby-identifier">nil?</span>
|
21
|
+
<span class="ruby-identifier">redirect</span> <span class="ruby-constant">R</span>(<span class="ruby-constant">Index</span>)
|
22
|
+
<span class="ruby-keyword kw">else</span>
|
23
|
+
<span class="ruby-identifier">return_to</span> = <span class="ruby-ivar">@state</span>.<span class="ruby-identifier">return_to</span>
|
24
|
+
<span class="ruby-ivar">@state</span>.<span class="ruby-identifier">return_to</span> = <span class="ruby-keyword kw">nil</span>
|
25
|
+
<span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">return_to</span>)
|
26
|
+
<span class="ruby-keyword kw">end</span>
|
27
|
+
<span class="ruby-keyword kw">else</span>
|
28
|
+
<span class="ruby-ivar">@info</span> = <span class="ruby-value str">'Wrong username or password.'</span>
|
29
|
+
<span class="ruby-keyword kw">end</span>
|
30
|
+
<span class="ruby-identifier">render</span> <span class="ruby-identifier">:login</span>
|
31
|
+
<span class="ruby-keyword kw">end</span></pre>
|
32
|
+
</body>
|
33
|
+
</html>
|
@@ -0,0 +1,112 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: CampingOAuthProvider::Helpers</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">CampingOAuthProvider::Helpers</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/examples/camping-oauth-provider/camping-oauth-provider_rb.html">
|
59
|
+
examples/camping-oauth-provider/camping-oauth-provider.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
</div>
|
78
|
+
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
|
83
|
+
<!-- if includes -->
|
84
|
+
<div id="includes">
|
85
|
+
<h3 class="section-bar">Included Modules</h3>
|
86
|
+
|
87
|
+
<div id="includes-list">
|
88
|
+
<span class="include-name"><a href="../OAuthCampingPlugin/Helpers.html">OAuthCampingPlugin::Helpers</a></span>
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div id="section">
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<!-- if method_list -->
|
102
|
+
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
<div id="validator-badges">
|
108
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
</body>
|
112
|
+
</html>
|