incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asa...@apache.org
Subject svn commit: r1469294 - in /sling/whiteboard/asanso/openidconnect: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/sling/ src/main/java/org/apache/sling/auth/ src/main/java/org/apache/sling/auth/ope...
Date Thu, 18 Apr 2013 12:27:03 GMT
Author: asanso
Date: Thu Apr 18 12:27:03 2013
New Revision: 1469294

URL: http://svn.apache.org/r1469294
Log:
SLING-2759 - Provide an OpenId Connect Authentication Handler :

* adding skeleton project to my whiteboard

Added:
    sling/whiteboard/asanso/openidconnect/
    sling/whiteboard/asanso/openidconnect/pom.xml
    sling/whiteboard/asanso/openidconnect/src/
    sling/whiteboard/asanso/openidconnect/src/main/
    sling/whiteboard/asanso/openidconnect/src/main/java/
    sling/whiteboard/asanso/openidconnect/src/main/java/org/
    sling/whiteboard/asanso/openidconnect/src/main/java/org/apache/
    sling/whiteboard/asanso/openidconnect/src/main/java/org/apache/sling/
    sling/whiteboard/asanso/openidconnect/src/main/java/org/apache/sling/auth/
    sling/whiteboard/asanso/openidconnect/src/main/java/org/apache/sling/auth/openidconnect/
    sling/whiteboard/asanso/openidconnect/src/main/java/org/apache/sling/auth/openidconnect/impl/
    sling/whiteboard/asanso/openidconnect/src/main/java/org/apache/sling/auth/openidconnect/impl/OpenIDConnectAuthenticationHandler.java
    sling/whiteboard/asanso/openidconnect/src/test/
    sling/whiteboard/asanso/openidconnect/src/test/java/

Added: sling/whiteboard/asanso/openidconnect/pom.xml
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/openidconnect/pom.xml?rev=1469294&view=auto
==============================================================================
--- sling/whiteboard/asanso/openidconnect/pom.xml (added)
+++ sling/whiteboard/asanso/openidconnect/pom.xml Thu Apr 18 12:27:03 2013
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.sling</groupId>
+        <artifactId>sling</artifactId>
+        <version>14</version>
+        <relativePath>../../../parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>org.apache.sling.auth.openidconnect</artifactId>
+    <packaging>bundle</packaging>
+    <version>0.0.1-SNAPSHOT</version>
+
+    <name>Apache Sling OpenID Connect Authentication</name>
+    <description>
+        Bundle implementing OpenID Connect authentication with login and logout support
+    </description>
+ 
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/auth/openidconnect</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/auth/openidconnect</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/auth/openidconnect</url>
+    </scm>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Import-Package>
+                        	*;resolution:=optional
+                        </Import-Package>                        
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+  
+    <dependencies>
+    	<dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.auth.core</artifactId>
+            <version>1.0.4</version>
+            <scope>provided</scope>
+        </dependency>
+        		<dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+        </dependency>
+		<dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+       	<dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+           	<version>1.7.0</version>
+            <scope>provided</scope>
+        </dependency>
+      	<dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+      	<dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+    </dependencies>
+</project>

Added: sling/whiteboard/asanso/openidconnect/src/main/java/org/apache/sling/auth/openidconnect/impl/OpenIDConnectAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/openidconnect/src/main/java/org/apache/sling/auth/openidconnect/impl/OpenIDConnectAuthenticationHandler.java?rev=1469294&view=auto
==============================================================================
--- sling/whiteboard/asanso/openidconnect/src/main/java/org/apache/sling/auth/openidconnect/impl/OpenIDConnectAuthenticationHandler.java
(added)
+++ sling/whiteboard/asanso/openidconnect/src/main/java/org/apache/sling/auth/openidconnect/impl/OpenIDConnectAuthenticationHandler.java
Thu Apr 18 12:27:03 2013
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.auth.openidconnect.impl;
+
+import java.io.IOException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.osgi.framework.Constants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.ConfigurationPolicy;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
+import org.apache.sling.auth.core.spi.AuthenticationHandler;
+import org.apache.sling.auth.core.spi.AuthenticationInfo;
+
+@Component(
+		metatype = true,
+		policy = ConfigurationPolicy.REQUIRE,
+		label = "Open ID Connect",
+		description = "Open ID Connect")
+@Service
+@Properties({
+	@Property(name = AuthenticationHandler.PATH_PROPERTY, value = "/"), 
+	@Property(name = Constants.SERVICE_RANKING, intValue = 50000) 
+}) 
+public class OpenIDConnectAuthenticationHandler implements AuthenticationHandler{
+	
+	 /** default log */
+    private final Logger log = LoggerFactory.getLogger(getClass());
+	
+
+	public AuthenticationInfo extractCredentials(HttpServletRequest request,
+			HttpServletResponse response) {
+ 		return null;
+	}
+
+	public boolean requestCredentials(HttpServletRequest request,
+			HttpServletResponse response) throws IOException {
+		return false;
+	}
+
+	public void dropCredentials(HttpServletRequest request,
+			HttpServletResponse response) throws IOException {
+		// TODO Auto-generated method stub
+		
+	}
+
+}



Mime
View raw message