|
@@ -47,6 +47,14 @@
|
47
|
47
|
// Secondly, if the user is being redirected back from their provider, the
|
48
|
48
|
// openid.mode parameter will be present (which PHP translates to openid_mode)
|
49
|
49
|
|
|
50
|
+ if (isset($_POST['openid_type']) && $_POST['openid_type'] != 'openid_url') {
|
|
51
|
+ // This allows users to select one of the pre-defined identity providers
|
|
52
|
+ // using the provided radio buttons. The values of the radio buttons specify
|
|
53
|
+ // an URL on which we can perform Yadis discovery to find the OpenID
|
|
54
|
+ // endpoint.
|
|
55
|
+ define('OPENID_URL', $_POST['openid_type']);
|
|
56
|
+ }
|
|
57
|
+
|
50
|
58
|
require('../../processor.php');
|
51
|
59
|
|
52
|
60
|
} else {
|
|
@@ -62,6 +70,7 @@
|
62
|
70
|
<style type="text/css">
|
63
|
71
|
input#openid_url {
|
64
|
72
|
background: url('../../openid.gif') no-repeat; padding-left: 20px;
|
|
73
|
+ margin: 5px 0px 0px 40px;
|
65
|
74
|
}
|
66
|
75
|
|
67
|
76
|
p { padding-left: 10px; }
|
|
@@ -69,6 +78,9 @@
|
69
|
78
|
p.succ { border-left: 10px solid #0f0; }
|
70
|
79
|
caption { text-align: left; }
|
71
|
80
|
table { margin: 10px; }
|
|
81
|
+
|
|
82
|
+ ul { list-style-type: none; }
|
|
83
|
+ input[type="radio"] { width: 20px; }
|
72
|
84
|
</style>
|
73
|
85
|
</head>
|
74
|
86
|
<body>
|
|
@@ -118,7 +130,12 @@
|
118
|
130
|
?>
|
119
|
131
|
<form action="<?PHP echo htmlentities($_SERVER['REQUEST_URI']); ?>"
|
120
|
132
|
method="post">
|
121
|
|
- <input type="text" name="openid_url" id="openid_url">
|
|
133
|
+ <ul>
|
|
134
|
+ <li><label><input type="radio" name="openid_type" value="gmail.com"> <img src="google.png" alt="Google"> Log in with my Google account</label></li>
|
|
135
|
+ <li><label><input type="radio" name="openid_type" value="yahoo.com"> <img src="yahoo.png" alt="Yahoo!"> Log in with my Yahoo! account</label></li>
|
|
136
|
+ <li><label><input type="radio" name="openid_type" value="openid_url" checked="checked"> Log in with another OpenID identity:</label> <br>
|
|
137
|
+ <input type="text" name="openid_url" id="openid_url"></li>
|
|
138
|
+ </ul>
|
122
|
139
|
<input type="submit" value="Login">
|
123
|
140
|
</form>
|
124
|
141
|
</body>
|