Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ColladocOpenIDVendor renamed to OpenIDVendor

  • Loading branch information...
commit e61272a1df4efa0e30e6e32d8e030d2deee60a39 1 parent 400836b
@ignatov ignatov authored
View
4 src/main/scala/bootstrap/liftweb/Boot.scala
@@ -38,7 +38,7 @@ import tools.colladoc.lib.sitemap._
import tools.colladoc.model.mapper._
import tools.colladoc.lib.js.JqUI._
import tools.colladoc.api.RestAPI
-import tools.colladoc.lib.openid.ColladocOpenIDVendor
+import tools.colladoc.lib.openid.OpenIDVendor
import tools.colladoc.boot.ColladocBoot
import xml.{Text, NodeSeq}
@@ -90,7 +90,7 @@ class Boot {
// RewriteResponse("search" :: Nil, Map("q" -> query))
// }
- LiftRules.dispatch.append(ColladocOpenIDVendor.dispatchPF)
+ LiftRules.dispatch.append(OpenIDVendor.dispatchPF)
LiftRules.setSiteMapFunc(sitemap)
LiftRules.statelessDispatchTable.append(ExportService)
View
11 ...ls/colladoc/lib/openid/ColladocOpenIDVendor.scala → ...cala/tools/colladoc/lib/openid/OpenIDVendor.scala
@@ -37,8 +37,7 @@ import net.liftweb.http.S
* Manages OpenID logins - creating a new entry in the database on login for a user who hasn't been seen before.
* @author Sergey Ignatov
*/
-object ColladocOpenIDVendor extends SimpleOpenIDVendor with Logger {
-
+object OpenIDVendor extends SimpleOpenIDVendor with Logger {
override def createAConsumer = new AnyRef with OpenIDConsumer[UserType] {
def addParams(di: DiscoveryInformation, authReq: AuthRequest) {
@@ -53,8 +52,8 @@ object ColladocOpenIDVendor extends SimpleOpenIDVendor with Logger {
beforeAuth = Box(addParams _)
}
- override def postLogin(id: Box[Identifier], res: VerificationResult) {
- id match {
+ override def postLogin(identifier: Box[Identifier], res: VerificationResult) {
+ identifier match {
case Full(id) =>
val user = User.createIfNew(id.getIdentifier)
@@ -66,10 +65,10 @@ object ColladocOpenIDVendor extends SimpleOpenIDVendor with Logger {
attrs.get(FirstName) map { n => user.firstName(trace("Extracted name", n)) }
attrs.get(LastName) map { n => user.lastName(trace("Extracted name", n)) }
- if (user.userName.is.trim isEmpty)
+ if (user.userName.is.trim.isEmpty)
user.userName(user.firstName + " " + user.lastName)
- if (user.userName.is.trim isEmpty)
+ if (user.userName.is.trim.isEmpty)
user.userName(id.getIdentifier)
user.save()
Please sign in to comment.
Something went wrong with that request. Please try again.