forgot to update the tests after verification. And also the X509view did not show the URI correctly. webid
authorHenry Story <henry.story@bblfish.net>
Fri, 14 Oct 2011 17:51:14 +0200
branchwebid
changeset 64 215441a92c78
parent 63 ca2de8338abf
child 68 86ffbd1bfc34
forgot to update the tests after verification. And also the X509view did not show the URI correctly.
src/main/scala/auth/WebIdClaim.scala
src/main/scala/auth/X509view.scala
--- a/src/main/scala/auth/WebIdClaim.scala	Fri Oct 14 16:15:52 2011 +0200
+++ b/src/main/scala/auth/WebIdClaim.scala	Fri Oct 14 17:51:14 2011 +0200
@@ -153,7 +153,7 @@
   private var valid = false
 
   def verified(implicit cache: WebCache): Boolean = {
-    if (!valid) verify(cache)
+    if (!valid) tests = verify(cache)
     tests.exists(v => v.isInstanceOf[Verified])
   }
   
@@ -163,7 +163,7 @@
     import collection.JavaConversions._
     import WebIDClaim._
     try {
-      if (!webId.startsWith("http:") && !webId.startsWith("https:")) {
+      return if (!webId.startsWith("http:") && !webId.startsWith("https:")) {
         //todo: ftp, and ftps should also be doable, though content negotiations is then lacking
         unsupportedProtocol::Nil
       } else if (!key.isInstanceOf[RSAPublicKey]) {
--- a/src/main/scala/auth/X509view.scala	Fri Oct 14 16:15:52 2011 +0200
+++ b/src/main/scala/auth/X509view.scala	Fri Oct 14 17:51:14 2011 +0200
@@ -45,7 +45,7 @@
           case X509Claim(xclaim: X509Claim) => <body>
             <h1>Authentication Info received</h1>
             <p>You were identified with the following WebIDs</p>
-             <ul>{xclaim.webidclaims.filter(cl=>cl.verified).map(p=> <li>{p}</li>)}</ul>
+             <ul>{xclaim.webidclaims.filter(cl=>cl.verified).map(p=> <li>{p.webId}</li>)}</ul>
             <p>You sent the following certificate</p>
             <pre>{xclaim.cert.toString}</pre>
           </body>