Make OpenID support more extensible
Lift-OpenID should allow extending OpenIdConsumer in a way that only the Attribute-Exchange request and SimpleRegistration request need to be overriden without changing the rest of the code.
I propose that the following methods be extracted (and default to returning None), Option could of course be replaced with Box if that's better.
and authRequest be changed like this:
The parameter discovered is for the purpose of customizing the requests for certain well-known OpenID providers, whose behaviour and attribute support varies.
I propose that the following methods be extracted (and default to returning None), Option could of course be replaced with Box if that's better.
def reqAttributeExchange(discovered: DiscoveryInformation): Option[FetchRequest] = None
def reqSimpleRegistration(discovered: DiscoveryInformation): Option[SRegRequest] = None
and authRequest be changed like this:
reqAttributeExchange(discovered) match {
case Some(fetch) => authReq.addExtension(fetch)
case None =>
}
reqSimpleRegistration(discovered) match {
case Some(sreg) => authReq.addExtension(sreg)
case None =>
}
The parameter discovered is for the purpose of customizing the requests for certain well-known OpenID providers, whose behaviour and attribute support varies.
Leave a comment
on 2010-02-08 08:50 *
By jeppenejsum
Assigned to set to jeppenejsum
Status changed from New to Accepted
on 2010-02-08 21:25 *
By jeppenejsum
Type changed from enhancement to -none-
Milestone set to Lift 2.0-M3