-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathoidc.ur
23 lines (21 loc) · 963 Bytes
/
oidc.ur
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
structure O = OpenIdConnect.Make(struct
open OidcSecrets
val authorize_url = bless "https://oidc.csail.mit.edu/authorize"
val access_token_url = bless "https://oidc.csail.mit.edu/token"
val userinfo_url = bless "https://oidc.csail.mit.edu/userinfo"
val https = False
val onCompletion = return <xml>It worked.</xml>
end)
val main =
email <- O.whoami;
name <- O.name;
return <xml><body>
<a link={O.authorize}>Authorize</a>
<hr/>
{case email of
None => <xml></xml>
| Some email => <xml><p><b>E-mail:</b> {[email]}</p></xml>}
{case name of
None => <xml></xml>
| Some name => <xml><p><b>Name:</b> {[name]}</p></xml>}
</body></xml>