--- a/src/main/scala/auth/Authz.scala Sun Nov 13 17:26:02 2011 -0500
+++ b/src/main/scala/auth/Authz.scala Sun Nov 13 21:15:05 2011 -0500
@@ -34,30 +34,13 @@
import javax.servlet.http.{HttpServletResponse, HttpServletRequest}
import com.hp.hpl.jena.rdf.model.{RDFNode, ResourceFactory}
import org.w3.readwriteweb.{Authoritative, Resource, ResourceManager, WebCache}
+import org.w3.readwriteweb.util.HttpMethod
/**
* @author hjs
* @created: 14/10/2011
*/
-// TODO pull request to the unfiltered project!
-object HttpMethod {
- def unapply(req: HttpRequest[_]): Option[Method] =
- Some(
- req.method match {
- case "GET" => GET
- case "PUT" => PUT
- case "HEAD" => HEAD
- case "POST" => POST
- case "CONNECT" => CONNECT
- case "OPTIONS" => OPTIONS
- case "TRACE" => TRACE
- case m => new Method(m)
- })
-
-
-}
-
object AuthZ {
implicit def x509toSubject(x509c: X509Claim)(implicit cache: WebCache): Subject = {
--- a/src/main/scala/auth/X509Cert.scala Sun Nov 13 17:26:02 2011 -0500
+++ b/src/main/scala/auth/X509Cert.scala Sun Nov 13 21:15:05 2011 -0500
@@ -213,7 +213,7 @@
*
*/
def needAuth(agent: String): Boolean =
- agent.contains("Java")
+ agent contains "Java"
}