You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/10/18 23:22:36 UTC
[sling-org-apache-sling-auth-xing-api] branch master created (now
5f2b4cc)
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git.
at 5f2b4cc SLING-7167 Adjust READMEs
This branch includes the following new commits:
new 43cb3c0 SLING-3731 SLING-3732 add Sling Authentication XING API, Sling Authentication XING OAuth and Sling Authentication XING Login
new ff74a03 SLING-3731 SLING-3732 add scm settings
new 18dee5c SLING-3731 SLING-3732 remove version from javax.jcr dependency
new d64c202 SLING-3731 SLING-3732 set version of packages org.apache.sling.auth.xing.api and org.apache.sling.auth.xing.api.users to 0.0.2
new 4a7f950 [maven-release-plugin] prepare release org.apache.sling.auth.xing.api-0.0.2
new a65c862 [maven-release-plugin] prepare for next development iteration
new a796b48 update to parent version 20
new 2ded861 Update to Sling Parent POM 22 with baselining enabled
new 11a9281 SLING-4698 - Set parent.relativePath to empty for all modules
new 135799c Update contrib modules to Parent 23
new 1ebd59d Contrib: remove superflous sling.java.version=6 as it's the default now
new 419870d set parent version to 24 and add empty relativePath where missing
new f5801a1 Update the contrib reactor to parent 25
new fde2172 Switch to parent pom 26
new 5f2b4cc SLING-7167 Adjust READMEs
The 15 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
--
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].
[sling-org-apache-sling-auth-xing-api] 14/15: Switch to parent pom
26
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit fde217227d924edc1514e27781ac413656cd50f8
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Jan 3 14:07:46 2016 +0000
Switch to parent pom 26
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1722720 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 1919991..8dd5ac0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>25</version>
+ <version>26</version>
<relativePath/>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 10/15: Update contrib
modules to Parent 23
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit 135799ca3f006727d4d2a55cfdee5e3fb5b01a74
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 25 13:10:59 2015 +0000
Update contrib modules to Parent 23
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1687503 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index bfbd3c0..29c9822 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>22</version>
+ <version>23</version>
<relativePath/>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 08/15: Update to Sling
Parent POM 22 with baselining enabled
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit 2ded861d38a2456580e77218f4e7dc8fbaa40946
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Oct 1 06:52:29 2014 +0000
Update to Sling Parent POM 22 with baselining enabled
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1628620 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index ebb2e8d..4141108 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>20</version>
+ <version>22</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 05/15:
[maven-release-plugin] prepare release org.apache.sling.auth.xing.api-0.0.2
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit 4a7f950ea4a9cbf752ecc2edd1dd08553753c1de
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jul 8 14:19:06 2014 +0000
[maven-release-plugin] prepare release org.apache.sling.auth.xing.api-0.0.2
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1608794 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index c8b2bb1..3d5599f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
</parent>
<artifactId>org.apache.sling.auth.xing.api</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>0.0.2</version>
<packaging>bundle</packaging>
<name>Apache Sling Authentication XING API</name>
@@ -42,9 +42,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/auth/org.apache.sling.auth.xing.api</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/auth/org.apache.sling.auth.xing.api</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/trunk/contrib/auth/org.apache.sling.auth.xing.api</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.auth.xing.api-0.0.2</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.auth.xing.api-0.0.2</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.auth.xing.api-0.0.2</url>
</scm>
<dependencies>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 15/15: SLING-7167 Adjust
READMEs
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit 5f2b4ccf450fb4f174a49c5fc9d7cceb26a74dc4
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Oct 3 10:01:44 2017 +0000
SLING-7167 Adjust READMEs
add uniform header linking to Sling project
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810884 13f79535-47bb-0310-9956-ffa450edef68
---
README.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 5f543b9..65084ee 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
-Apache Sling Authentication XING API
-====================================
+# Apache Sling Authentication XING API
+
+This module is part of the [Apache Sling](https://sling.apache.org) project.
shared API bundle for Authentication XING Login and Authentication XING Oauth
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 02/15: SLING-3731 SLING-3732
add scm settings
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit ff74a03486fe6b2aeac400f23602dfe8905dca52
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Mon Jul 7 06:24:04 2014 +0000
SLING-3731 SLING-3732 add scm settings
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1608345 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/pom.xml b/pom.xml
index b17d254..ec8f0a3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,6 +41,12 @@
<sling.java.version>6</sling.java.version>
</properties>
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/auth/org.apache.sling.auth.xing.api</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/auth/org.apache.sling.auth.xing.api</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/contrib/auth/org.apache.sling.auth.xing.api</url>
+ </scm>
+
<dependencies>
<!-- javax -->
<dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 09/15: SLING-4698 - Set
parent.relativePath to empty for all modules
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit 11a9281218c789eb7848f846c583f89360cb6352
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu May 7 10:14:40 2015 +0000
SLING-4698 - Set parent.relativePath to empty for all modules
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1678154 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 4141108..bfbd3c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
<version>22</version>
- <relativePath>../../../parent/pom.xml</relativePath>
+ <relativePath/>
</parent>
<artifactId>org.apache.sling.auth.xing.api</artifactId>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 11/15: Contrib: remove
superflous sling.java.version=6 as it's the default now
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit 1ebd59ddd3d492f34496fa11a793635c802c4ad3
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 25 13:16:35 2015 +0000
Contrib: remove superflous sling.java.version=6 as it's the default now
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1687508 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 29c9822..c4470a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,7 +38,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <sling.java.version>6</sling.java.version>
</properties>
<scm>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 06/15:
[maven-release-plugin] prepare for next development iteration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit a65c862bd350cba2c47b89e6f0665c1ffe2cae5d
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jul 8 14:19:12 2014 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1608796 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 3d5599f..ad63aeb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
</parent>
<artifactId>org.apache.sling.auth.xing.api</artifactId>
- <version>0.0.2</version>
+ <version>0.0.3-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache Sling Authentication XING API</name>
@@ -42,9 +42,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.auth.xing.api-0.0.2</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.auth.xing.api-0.0.2</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.auth.xing.api-0.0.2</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/auth/org.apache.sling.auth.xing.api</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/auth/org.apache.sling.auth.xing.api</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/contrib/auth/org.apache.sling.auth.xing.api</url>
</scm>
<dependencies>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 01/15: SLING-3731 SLING-3732
add Sling Authentication XING API,
Sling Authentication XING OAuth and Sling Authentication XING Login
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit 43cb3c04fee4938b355303ff93ce2fc7d58eaeed
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Fri Jul 4 15:43:38 2014 +0000
SLING-3731 SLING-3732 add Sling Authentication XING API, Sling Authentication XING OAuth and Sling Authentication XING Login
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1607877 13f79535-47bb-0310-9956-ffa450edef68
---
README.md | 4 +
pom.xml | 124 +++++++++++++++++++++
.../auth/xing/api/AbstractXingUserManager.java | 108 ++++++++++++++++++
.../org/apache/sling/auth/xing/api/XingUser.java | 44 ++++++++
.../sling/auth/xing/api/XingUserManager.java | 39 +++++++
.../apache/sling/auth/xing/api/package-info.java | 20 ++++
.../apache/sling/auth/xing/api/users/Users.java | 36 ++++++
.../sling/auth/xing/api/users/package-info.java | 20 ++++
8 files changed, 395 insertions(+)
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5f543b9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,4 @@
+Apache Sling Authentication XING API
+====================================
+
+shared API bundle for Authentication XING Login and Authentication XING Oauth
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..b17d254
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>sling</artifactId>
+ <version>19</version>
+ <relativePath>../../../parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>org.apache.sling.auth.xing.api</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <name>Apache Sling Authentication XING API</name>
+ <description>Apache Sling Authentication XING API</description>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <sling.java.version>6</sling.java.version>
+ </properties>
+
+ <dependencies>
+ <!-- javax -->
+ <dependency>
+ <groupId>javax.jcr</groupId>
+ <artifactId>jcr</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- Apache Commons -->
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.4</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- Apache Sling -->
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.api</artifactId>
+ <version>2.7.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.jcr.api</artifactId>
+ <version>2.2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- Apache Jackrabbit -->
+ <dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-api</artifactId>
+ <version>2.0.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- bndlib -->
+ <dependency>
+ <groupId>biz.aQute.bnd</groupId>
+ <artifactId>bndlib</artifactId>
+ <version>2.3.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- Gson -->
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.2.4</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- logging -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.7</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- testing -->
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>6.8.8</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-Category>sling</Bundle-Category>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/src/main/java/org/apache/sling/auth/xing/api/AbstractXingUserManager.java b/src/main/java/org/apache/sling/auth/xing/api/AbstractXingUserManager.java
new file mode 100644
index 0000000..7c18efe
--- /dev/null
+++ b/src/main/java/org/apache/sling/auth/xing/api/AbstractXingUserManager.java
@@ -0,0 +1,108 @@
+/*
+ * 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.xing.api;
+
+import javax.jcr.Credentials;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.SimpleCredentials;
+
+import org.apache.jackrabbit.api.JackrabbitSession;
+import org.apache.jackrabbit.api.security.user.Authorizable;
+import org.apache.jackrabbit.api.security.user.User;
+import org.apache.jackrabbit.api.security.user.UserManager;
+import org.apache.sling.jcr.api.SlingRepository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class AbstractXingUserManager implements XingUserManager {
+
+ protected boolean autoCreateUser;
+
+ protected boolean autoUpdateUser;
+
+ protected Session session;
+
+ public static final boolean DEFAULT_AUTO_CREATE_USER = true;
+
+ public static final boolean DEFAULT_AUTO_UPDATE_USER = false;
+
+ private final Logger logger = LoggerFactory.getLogger(AbstractXingUserManager.class);
+
+ protected abstract SlingRepository getSlingRepository();
+
+ @Override
+ public boolean autoCreate() {
+ return autoCreateUser;
+ }
+
+ @Override
+ public boolean autoUpdate() {
+ return autoUpdateUser;
+ }
+
+ @Override
+ public User getUser(final Credentials credentials) {
+ if (credentials instanceof SimpleCredentials) {
+ final SimpleCredentials simpleCredentials = (SimpleCredentials) credentials;
+ final String userId = simpleCredentials.getUserID();
+ return getUser(userId);
+ }
+ return null;
+ }
+
+ protected User getUser(final String userId) {
+ logger.info("getting user with id '{}'", userId);
+ try {
+ final Session session = getSession();
+ final UserManager userManager = getUserManager(session);
+ final Authorizable authorizable = userManager.getAuthorizable(userId);
+ if (authorizable != null) {
+ if (authorizable instanceof User) {
+ final User user = (User) authorizable;
+ logger.debug("user for id '{}' found", userId);
+ return user;
+ } else {
+ logger.debug("found authorizable with id '{}' is not an user", authorizable.getID());
+ }
+ }
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ }
+ return null;
+ }
+
+ protected synchronized Session getSession() throws RepositoryException {
+ if (session == null || !session.isLive()) {
+ session = getSlingRepository().loginService(null, null);
+ }
+ return session;
+ }
+
+ protected UserManager getUserManager(final Session session) throws RepositoryException {
+ if (session instanceof JackrabbitSession) {
+ final JackrabbitSession jackrabbitSession = (JackrabbitSession) session;
+ return jackrabbitSession.getUserManager();
+ } else {
+ logger.error("Cannot get UserManager from session: not a Jackrabbit session");
+ return null;
+ }
+ }
+
+}
diff --git a/src/main/java/org/apache/sling/auth/xing/api/XingUser.java b/src/main/java/org/apache/sling/auth/xing/api/XingUser.java
new file mode 100644
index 0000000..1edf5b1
--- /dev/null
+++ b/src/main/java/org/apache/sling/auth/xing/api/XingUser.java
@@ -0,0 +1,44 @@
+/*
+ * 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.xing.api;
+
+public class XingUser {
+
+ private String id;
+
+ private String firstName;
+
+ private String lastName;
+
+ public XingUser() {
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+}
diff --git a/src/main/java/org/apache/sling/auth/xing/api/XingUserManager.java b/src/main/java/org/apache/sling/auth/xing/api/XingUserManager.java
new file mode 100644
index 0000000..b1e339f
--- /dev/null
+++ b/src/main/java/org/apache/sling/auth/xing/api/XingUserManager.java
@@ -0,0 +1,39 @@
+/*
+ * 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.xing.api;
+
+import javax.jcr.Credentials;
+
+import aQute.bnd.annotation.ProviderType;
+import org.apache.jackrabbit.api.security.user.User;
+
+@ProviderType
+public interface XingUserManager {
+
+ boolean autoCreate();
+
+ boolean autoUpdate();
+
+ User getUser(Credentials credentials);
+
+ User createUser(Credentials credentials);
+
+ User updateUser(Credentials credentials);
+
+}
diff --git a/src/main/java/org/apache/sling/auth/xing/api/package-info.java b/src/main/java/org/apache/sling/auth/xing/api/package-info.java
new file mode 100644
index 0000000..45538f6
--- /dev/null
+++ b/src/main/java/org/apache/sling/auth/xing/api/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * 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.
+ */
+@aQute.bnd.annotation.Version("0.0.1")
+package org.apache.sling.auth.xing.api;
diff --git a/src/main/java/org/apache/sling/auth/xing/api/users/Users.java b/src/main/java/org/apache/sling/auth/xing/api/users/Users.java
new file mode 100644
index 0000000..6afbe55
--- /dev/null
+++ b/src/main/java/org/apache/sling/auth/xing/api/users/Users.java
@@ -0,0 +1,36 @@
+/*
+ * 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.xing.api.users;
+
+import java.util.List;
+
+import org.apache.sling.auth.xing.api.XingUser;
+
+public class Users {
+
+ private List<XingUser> users;
+
+ public Users() {
+ }
+
+ public List<XingUser> getUsers() {
+ return users;
+ }
+
+}
diff --git a/src/main/java/org/apache/sling/auth/xing/api/users/package-info.java b/src/main/java/org/apache/sling/auth/xing/api/users/package-info.java
new file mode 100644
index 0000000..90c15a7
--- /dev/null
+++ b/src/main/java/org/apache/sling/auth/xing/api/users/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * 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.
+ */
+@aQute.bnd.annotation.Version("0.0.1")
+package org.apache.sling.auth.xing.api.users;
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 04/15: SLING-3731 SLING-3732
set version of packages org.apache.sling.auth.xing.api and
org.apache.sling.auth.xing.api.users to 0.0.2
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit d64c202ab88c6628bad98f4be3ba6b07be4cf7e8
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jul 8 14:08:47 2014 +0000
SLING-3731 SLING-3732 set version of packages org.apache.sling.auth.xing.api and org.apache.sling.auth.xing.api.users to 0.0.2
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1608791 13f79535-47bb-0310-9956-ffa450edef68
---
src/main/java/org/apache/sling/auth/xing/api/package-info.java | 2 +-
src/main/java/org/apache/sling/auth/xing/api/users/package-info.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/auth/xing/api/package-info.java b/src/main/java/org/apache/sling/auth/xing/api/package-info.java
index 45538f6..8e51328 100644
--- a/src/main/java/org/apache/sling/auth/xing/api/package-info.java
+++ b/src/main/java/org/apache/sling/auth/xing/api/package-info.java
@@ -16,5 +16,5 @@
* specific language governing permissions and limitations
* under the License.
*/
-@aQute.bnd.annotation.Version("0.0.1")
+@aQute.bnd.annotation.Version("0.0.2")
package org.apache.sling.auth.xing.api;
diff --git a/src/main/java/org/apache/sling/auth/xing/api/users/package-info.java b/src/main/java/org/apache/sling/auth/xing/api/users/package-info.java
index 90c15a7..06fe5ce 100644
--- a/src/main/java/org/apache/sling/auth/xing/api/users/package-info.java
+++ b/src/main/java/org/apache/sling/auth/xing/api/users/package-info.java
@@ -16,5 +16,5 @@
* specific language governing permissions and limitations
* under the License.
*/
-@aQute.bnd.annotation.Version("0.0.1")
+@aQute.bnd.annotation.Version("0.0.2")
package org.apache.sling.auth.xing.api.users;
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 13/15: Update the contrib
reactor to parent 25
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit f5801a1084582d5588660e2e55b869faa43784df
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 5 10:04:15 2015 +0000
Update the contrib reactor to parent 25
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1706781 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 7412d51..1919991 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>24</version>
+ <version>25</version>
<relativePath/>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 12/15: set parent version to
24 and add empty relativePath where missing
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit 419870da4b784f08637aad8729d00f00c3f5f432
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jul 7 07:36:29 2015 +0000
set parent version to 24 and add empty relativePath where missing
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1689588 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index c4470a4..7412d51 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>23</version>
+ <version>24</version>
<relativePath/>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 07/15: update to parent
version 20
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit a796b48c8a86baaa85ddc89bdeb9cbd4669f66ab
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Mon Aug 4 18:07:35 2014 +0000
update to parent version 20
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1615714 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index ad63aeb..ebb2e8d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
- <version>19</version>
+ <version>20</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-org-apache-sling-auth-xing-api] 03/15: SLING-3731 SLING-3732
remove version from javax.jcr dependency
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-xing-api.git
commit 18dee5cb6f4bdb7c5b0761f8c4081d21bc022fa9
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Mon Jul 7 07:26:22 2014 +0000
SLING-3731 SLING-3732 remove version from javax.jcr dependency
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1608354 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index ec8f0a3..c8b2bb1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,7 +52,6 @@
<dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
- <version>2.0</version>
<scope>provided</scope>
</dependency>
<!-- Apache Commons -->
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.