File: login.html

package info (click to toggle)
golang-github-yohcop-openid-go 0.0~git20170901.0.cfc72ed-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 184 kB
  • sloc: makefile: 3
file content (45 lines) | stat: -rw-r--r-- 1,185 bytes parent folder | download
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
<html>
  <head>
    <title>go OpenID sample app</title>
    <script>
    function setId(id) {
      document.forms[0].id.value = id;
      document.forms[0].submit();
      return false;
    }
    </script>
  </head>
  <body>
    <h1>Login</h1>

    <form action="/discover" method="POST">
      <input type="hidden" name="id">
    </form>

    <h2>Sign in with:</h2>
    <ul>
      <li>
        <button onclick="return setId('https://me.yahoo.com')">
          Yahoo!
        </button>
      </li>
      <li>
        <button onclick="return setId('http://steamcommunity.com/openid')">
          Steam
        </button>
      </li>
      <li>
        <!-- 
          OpenID 2.0 Spec point 7.1 http://openid.net/specs/openid-authentication-2_0.html#initiation
          
          Browser extensions or other software that support OpenID Authentication
          can detect an OpenID input field if it has the "name" attribute set to "openid_identifier"
        -->
        <input type="text" id="idfield" name="openid_identifier">
        <button onclick="return setId(document.getElementById('idfield').value);">
          Go
        </button>
      </li>
    </ul>
  </body>
</html>