You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2015/02/27 15:24:44 UTC
qpid-jms git commit: add support for the EXTERNAL SASL mechanism
Repository: qpid-jms
Updated Branches:
refs/heads/master cb12c36d1 -> 54dbf2eff
add support for the EXTERNAL SASL mechanism
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/54dbf2ef
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/54dbf2ef
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/54dbf2ef
Branch: refs/heads/master
Commit: 54dbf2effcd1b88cc0d0ea00d33f4da6b0ebbe61
Parents: cb12c36
Author: Robert Gemmell <ro...@apache.org>
Authored: Fri Feb 27 13:43:57 2015 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Fri Feb 27 13:43:57 2015 +0000
----------------------------------------------------------------------
.../apache/qpid/jms/sasl/ExternalMechanism.java | 43 ++++++++++++++++++++
.../qpid/jms/sasl/ExternalMechanismFactory.java | 28 +++++++++++++
.../services/org/apache/qpid/jms/sasl/EXTERNAL | 17 ++++++++
3 files changed, 88 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/54dbf2ef/qpid-jms-client/src/main/java/org/apache/qpid/jms/sasl/ExternalMechanism.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/sasl/ExternalMechanism.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/sasl/ExternalMechanism.java
new file mode 100644
index 0000000..0daaed2
--- /dev/null
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/sasl/ExternalMechanism.java
@@ -0,0 +1,43 @@
+/**
+ * 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.qpid.jms.sasl;
+
+/**
+ * Implements the External SASL authentication mechanism.
+ */
+public class ExternalMechanism extends AbstractMechanism {
+
+ @Override
+ public byte[] getInitialResponse() {
+ return EMPTY;
+ }
+
+ @Override
+ public byte[] getChallengeResponse(byte[] challenge) {
+ return EMPTY;
+ }
+
+ @Override
+ public int getPriority() {
+ return PRIORITY.HIGHEST.getValue();
+ }
+
+ @Override
+ public String getName() {
+ return "EXTERNAL";
+ }
+}
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/54dbf2ef/qpid-jms-client/src/main/java/org/apache/qpid/jms/sasl/ExternalMechanismFactory.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/sasl/ExternalMechanismFactory.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/sasl/ExternalMechanismFactory.java
new file mode 100644
index 0000000..dc77e31
--- /dev/null
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/sasl/ExternalMechanismFactory.java
@@ -0,0 +1,28 @@
+/**
+ * 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.qpid.jms.sasl;
+
+/**
+ * Create the External SASL Authentication Mechanism types.
+ */
+public class ExternalMechanismFactory implements MechanismFactory {
+
+ @Override
+ public Mechanism createMechanism() {
+ return new ExternalMechanism();
+ }
+}
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/54dbf2ef/qpid-jms-client/src/main/resources/META-INF/services/org/apache/qpid/jms/sasl/EXTERNAL
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/resources/META-INF/services/org/apache/qpid/jms/sasl/EXTERNAL b/qpid-jms-client/src/main/resources/META-INF/services/org/apache/qpid/jms/sasl/EXTERNAL
new file mode 100644
index 0000000..d37547e
--- /dev/null
+++ b/qpid-jms-client/src/main/resources/META-INF/services/org/apache/qpid/jms/sasl/EXTERNAL
@@ -0,0 +1,17 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+class=org.apache.qpid.jms.sasl.ExternalMechanismFactory
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org