comparison src/ur/openid.ur @ 26:ee97bc0e08fa

Some default OPs, along with some tweaks to keep them happy
author Adam Chlipala <adam@chlipala.net>
date Sun, 23 Jan 2011 14:57:49 -0500
parents 70ab0230649b
children f129ddee75f3
comparison
equal deleted inserted replaced
25:c560ec5bf514 26:ee97bc0e08fa
381 case dy of 381 case dy of
382 None => return "Discovery failed" 382 None => return "Discovery failed"
383 | Some dy => 383 | Some dy =>
384 case r.Association of 384 case r.Association of
385 Stateless => 385 Stateless =>
386 redirect (bless (dy ^ "?openid.ns=http://specs.openid.net/auth/2.0&openid.mode=checkid_setup&openid.claimed_id=" 386 redirect (bless (dy ^ "?openid.ns=http://specs.openid.net/auth/2.0&openid.mode=checkid_setup"
387 ^ eatFragment r.Identifier 387 ^ "&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select"
388 ^ "&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&openid.return_to=" 388 ^ "&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&openid.assoc_handle="
389 ^ show (effectfulUrl returnTo) ^ realmString)) 389 ^ "&openid.return_to=" ^ show (effectfulUrl returnTo) ^ realmString))
390 | Stateful ar => 390 | Stateful ar =>
391 assoc <- association ar.AssociationType ar.AssociationSessionType dy; 391 assoc <- association ar.AssociationType ar.AssociationSessionType dy;
392 case assoc of 392 case assoc of
393 AssError msg => return ("Association failure: " ^ msg) 393 AssError msg => return ("Association failure: " ^ msg)
394 | AssAlternate _ => return "Association failure: server didn't accept its own alternate association modes" 394 | AssAlternate _ => return "Association failure: server didn't accept its own alternate association modes"
395 | Association assoc => 395 | Association assoc =>
396 redirect (bless (dy ^ "?openid.ns=http://specs.openid.net/auth/2.0&openid.mode=checkid_setup&openid.claimed_id=" 396 redirect (bless (dy ^ "?openid.ns=http://specs.openid.net/auth/2.0&openid.mode=checkid_setup"
397 ^ eatFragment r.Identifier 397 ^ "&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select"
398 ^ "&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&openid.assoc_handle=" 398 ^ "&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&openid.assoc_handle="
399 ^ assoc.Handle ^ "&openid.return_to=" ^ show (effectfulUrl returnTo) ^ realmString)) 399 ^ assoc.Handle ^ "&openid.return_to=" ^ show (effectfulUrl returnTo) ^ realmString))
400 end 400 end
401 401
402 task periodic 60 = fn () => 402 task periodic 60 = fn () =>