minor simplification of code. btw. all this works best with netty. webid
authorHenry Story <henry.story@bblfish.net>
Mon, 19 Dec 2011 13:23:20 +0100
branchwebid
changeset 152 5df9d155c38d
parent 151 452667628c73
child 153 37dd439c9383
minor simplification of code. btw. all this works best with netty.
src/main/scala/auth/WebIDSrvc.scala
--- a/src/main/scala/auth/WebIDSrvc.scala	Sun Dec 18 15:01:02 2011 +0100
+++ b/src/main/scala/auth/WebIDSrvc.scala	Mon Dec 19 13:23:20 2011 +0100
@@ -83,8 +83,7 @@
 
   def intent : Cycle.Intent[Req,Res] = {
     case req @ Path(Seg("srv" :: "idp":: file :: Nil)) => srvStaticFiles(file)
-    case req @ Path("/srv/idp")  => req match {
-      case Params(RelyingParty(rp)) => req match {
+    case req @ Path("/srv/idp") & Params(RelyingParty(rp))  => req match {
           // we authenticate the user only if he has agreed to be authenticated on the page, which we know if the
           // request is a POST
           case POST(_) & X509Claim(claim: X509Claim) => { //repetition because of intellij scala 0.5.273 bug
@@ -98,7 +97,6 @@
               case claim: X509Claim => if ( claim.verified.size > 0 ) authenticatedPg else errorPg
             }
             Ok ~> Html5(new ServiceTrans(rp,claim).apply(pg))
-          }
       }
       case _ => Ok ~> Html5(aboutTransform(aboutPg))
     }
@@ -106,7 +104,6 @@
   }
 
 
-
   object TransUtils {
     //taken from http://stackoverflow.com/questions/2569580/how-to-change-attribute-on-scala-xml-element
     implicit def addGoodCopyToAttribute(attr: Attribute) = new {