summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html
blob: ee3195c215f70cc8d169485798086a999dc8096e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
     http://www.apache.org/licenses/LICENSE-2.0
     
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
-->

<html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0"/> 
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
<script type="text/javascript" src="/all-min.js"></script>
<title>Sign in</title>
</head>
<body>
<h1>Sign in with an OpenID or OAuth provider</h1>
<br/>

<script type="text/javascript">
function queryParams() {
    qp = new Array();
    qs = window.location.search.substring(1).split('&');
    for (i = 0; i < qs.length; i++) {
        e = qs[i].indexOf('=');
        if (e > 0)
            qp[qs[i].substring(0, e)] = unescape(qs[i].substring(e + 1));
    }
    return qp;
}

function openauthReferrer() {
    r = queryParams()['openauth_referrer'];
    if (typeof(r) == 'undefined')
        return '/';
    q = r.indexOf('?');
    if (q > 0)
        return r.substring(0, q);
    return r;
}

if (typeof(openauthReferrer()) == 'undefined') {
    document.location = '/';
}

function submitOpenIDSignin(w) {
    clearAuthCookie();
    document.openIDSignin.openid_identifier.value = w();
    document.openIDSignin.action = openauthReferrer();
    document.openIDSignin.submit();
}

function withGoogle() {
    return 'https://www.google.com/accounts/o8/id';
}

function withYahoo() {
    return 'https://me.yahoo.com/';
}

function withMyOpenID() {
    return 'http://www.myopenid.com/xrds';
}

function withVerisign() {
    return 'https://pip.verisignlabs.com/';
}

function withMySpace() {
    return 'https://api.myspace.com/openid';
}

function withGoogleApps() {
    return 'https://www.google.com/accounts/o8/site-xrds?ns=2&hd=' + document.fields.domain.value;
}

function withLivejournal() {
    return 'http://' + document.fields.ljuser.value + '.livejournal.com';
}

function withBlogspot() {
    return 'http://' + document.fields.bsuser.value + '.blogspot.com';
}

function withBlogger() {
    return 'http://' + document.fields.bguser.value + '.blogger.com';
}

function withXRDSEndpoint() {
    return document.fields.endpoint.value;
}

function submitOAuth2Signin(w) {
    parms = w();
    clearAuthCookie();
    document.oauth2Signin.oauth2_authorize.value = parms[0];
    document.oauth2Signin.oauth2_access_token.value = parms[1];
    document.oauth2Signin.oauth2_client_id.value = parms[2];
    document.oauth2Signin.oauth2_info.value = parms[3];
    document.oauth2Signin.oauth2_scope.value = parms[4];
    document.oauth2Signin.oauth2_display.value = parms[5];
    document.oauth2Signin.openauth_referrer.value = openauthReferrer();
    document.oauth2Signin.action = '/oauth2/authorize/';
    document.oauth2Signin.submit();
}

function withFacebook() {
    var parms = ['https://graph.facebook.com/oauth/authorize', 'https://graph.facebook.com/oauth/access_token', 'facebook.com', 'https://graph.facebook.com/me', 'email', 'page'];
    return parms;
}

function withGithub() {
    var parms = ['https://github.com/login/oauth/authorize', 'https://github.com/login/oauth/access_token', 'github.com', 'https://github.com/api/v2/json/user/show', 'email', ''];
    return parms;
}

function submitOAuth1Signin(w) {
    parms = w();
    clearAuthCookie();
    document.oauth1Signin.oauth1_request_token.value = parms[0];
    document.oauth1Signin.oauth1_authorize.value = parms[1];
    document.oauth1Signin.oauth1_access_token.value = parms[2];
    document.oauth1Signin.oauth1_client_id.value = parms[3];
    document.oauth1Signin.oauth1_info.value = parms[4];
    document.oauth1Signin.openauth_referrer.value = openauthReferrer();
    document.oauth1Signin.action = '/oauth1/authorize/';
    document.oauth1Signin.submit();
}

function withLinkedin() {
    var parms = ['https://api.linkedin.com/uas/oauth/requestToken', 'https://www.linkedin.com/uas/oauth/authorize', 'https://api.linkedin.com/uas/oauth/accessToken', 'linkedin.com', 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name,public-profile-url)'];
    return parms;
}

function withTwitter() {
    var parms = ['https://api.twitter.com/oauth/request_token', 'https://api.twitter.com/oauth/authorize', 'https://api.twitter.com/oauth/access_token', 'twitter.com', 'https://api.twitter.com/1/statuses/user_timeline.json'];
    return parms;
}
</script>

<form name="fields">
<p>Sign in with your Google account<br/><input type="button" onclick="submitOpenIDSignin(withGoogle)" value="Sign in"/></p>
<p>Sign in with your Yahoo account<br/><input type="button" onclick="submitOpenIDSignin(withYahoo)" value="Sign in"/></p>
<p>Sign in with your MyOpenID account<br/><input type="button" onclick="submitOpenIDSignin(withMyOpenID)" value="Sign in"/></p>
<p>Sign in with your Verisign account<br/><input type="button" onclick="submitOpenIDSignin(withVerisign)" value="Sign in"/></p>
<p>Sign in with your MySpace account<br/><input type="button" onclick="submitOpenIDSignin(withMySpace)" value="Sign in"/></p>

<p>Sign in with a Google apps domain<br/>
<input type="text" size="20" name="domain" value="example.com"/><br/>
<input type="button" onclick="submitOpenIDSignin(withGoogleApps)" value="Sign in"/></p>

<p>Sign in with your Livejournal account<br/>
<input type="text" size="10" name="ljuser" value=""/><br/>
<input type="button" onclick="submitOpenIDSignin(withLivejournal)" value="Sign in"/></p>

<p>Sign in with your Blogspot account<br/>
<input type="text" size="10" name="bsuser" value=""/><br/>
<input type="button" onclick="submitOpenIDSignin(withBlogspot)" value="Sign in"/></p>

<p>Sign in with your Blogger account<br/>
<input type="text" size="10" name="bguser" value=""/><br/>
<input type="button" onclick="submitOpenIDSignin(withBlogger)" value="Sign in"/></p>

<p>Sign in with an OpenID endpoint<br/>
<input type="text" size="50" name="endpoint" value="https://www.google.com/accounts/o8/id"/><br/>
<input type="button" onclick="submitOpenIDSignin(withXRDSEndpoint)" value="Sign in"/></p>

<p>Sign in with your Facebook account<br/><input type="button" onclick="submitOAuth2Signin(withFacebook)" value="Sign in"/></p>
<p>Sign in with your Github account<br/><input type="button" onclick="submitOAuth2Signin(withGithub)" value="Sign in"/></p>

<p>Sign in with your Linkedin account<br/><input type="button" onclick="submitOAuth1Signin(withLinkedin)" value="Sign in"/></p>
<p>Sign in with your Twitter account<br/><input type="button" onclick="submitOAuth1Signin(withTwitter)" value="Sign in"/></p>
</form>

<form name="openIDSignin" action="/" method="GET">
<input type="hidden" name="openid_identifier" value=""/>
</form>

<form name="oauth2Signin" action="/" method="GET">
<input type="hidden" name="oauth2_authorize" value=""/>
<input type="hidden" name="oauth2_access_token" value=""/>
<input type="hidden" name="oauth2_client_id" value=""/>
<input type="hidden" name="oauth2_info" value=""/>
<input type="hidden" name="oauth2_scope" value=""/>
<input type="hidden" name="oauth2_display" value=""/>
<input type="hidden" name="openauth_referrer" value=""/>
</form>

<form name="oauth1Signin" action="/" method="GET">
<input type="hidden" name="oauth1_request_token" value=""/>
<input type="hidden" name="oauth1_authorize" value=""/>
<input type="hidden" name="oauth1_access_token" value=""/>
<input type="hidden" name="oauth1_client_id" value=""/>
<input type="hidden" name="oauth1_info" value=""/>
<input type="hidden" name="openauth_referrer" value=""/>
</form>

</body>
</html>