You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2004/11/03 05:52:59 UTC
svn commit: rev 56476 - incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages
Author: erodriguez
Date: Tue Nov 2 20:52:57 2004
New Revision: 56476
Added:
incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/
incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/AbstractPasswordMessage.java
incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/AbstractPasswordMessageModifier.java
incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/ChangePasswordReply.java
incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/ChangePasswordReplyModifier.java
incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/ChangePasswordRequest.java
incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/ChangePasswordRequestModifier.java
Log:
Message value objects for the change password protocol.
Added: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/AbstractPasswordMessage.java
==============================================================================
--- (empty file)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/AbstractPasswordMessage.java Tue Nov 2 20:52:57 2004
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed 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.kerberos.changepw.messages;
+
+abstract public class AbstractPasswordMessage {
+
+ // ChangePassword protocol version number
+ public static final int PVNO = 1;
+
+ private short _messageLength;
+ private short _protocolVersionNumber;
+ private short _authHeaderLength;
+
+ protected AbstractPasswordMessage(short messageLength, short versionNumber,
+ short authHeaderLength) {
+
+ _messageLength = messageLength;
+ _protocolVersionNumber = versionNumber;
+ _authHeaderLength = authHeaderLength;
+ }
+
+ public short getMessageLength() {
+ return _messageLength;
+ }
+ public short getProtocolVersionNumber() {
+ return _protocolVersionNumber;
+ }
+ public short getAuthHeaderLength() {
+ return _authHeaderLength;
+ }
+}
+
Added: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/AbstractPasswordMessageModifier.java
==============================================================================
--- (empty file)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/AbstractPasswordMessageModifier.java Tue Nov 2 20:52:57 2004
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed 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.kerberos.changepw.messages;
+
+abstract public class AbstractPasswordMessageModifier {
+
+ protected short _messageLength;
+ protected short _protocolVersionNumber;
+ protected short _authHeaderLength;
+
+ public void setMessageLength(short length) {
+ _messageLength = length;
+ }
+ public void setProtocolVersionNumber(short versionNumber) {
+ _protocolVersionNumber = versionNumber;
+ }
+ public void setAuthHeaderLength(short length) {
+ _authHeaderLength = length;
+ }
+}
+
Added: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/ChangePasswordReply.java
==============================================================================
--- (empty file)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/ChangePasswordReply.java Tue Nov 2 20:52:57 2004
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed 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.kerberos.changepw.messages;
+
+import org.apache.kerberos.messages.application.*;
+
+public class ChangePasswordReply extends AbstractPasswordMessage {
+
+ private ApplicationReply _applicationReply;
+ private PrivateMessage _privateMessage;
+
+ public ChangePasswordReply(short messageLength, short versionNumber, short authHeaderLength,
+ ApplicationReply appReply, PrivateMessage privateMessage) {
+
+ super(messageLength, versionNumber, authHeaderLength);
+
+ _applicationReply = appReply;
+ _privateMessage = privateMessage;
+ }
+
+ public ApplicationReply getApplicationReply() {
+ return _applicationReply;
+ }
+
+ public PrivateMessage getPrivateMessage() {
+ return _privateMessage;
+ }
+}
+
Added: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/ChangePasswordReplyModifier.java
==============================================================================
--- (empty file)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/ChangePasswordReplyModifier.java Tue Nov 2 20:52:57 2004
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed 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.kerberos.changepw.messages;
+
+import org.apache.kerberos.messages.application.*;
+
+public class ChangePasswordReplyModifier extends AbstractPasswordMessageModifier {
+
+ private ApplicationReply _appReply;
+ private PrivateMessage _privateMessage;
+
+ public ChangePasswordReply getChangePasswordReply() {
+
+ return new ChangePasswordReply(_messageLength, _protocolVersionNumber,
+ _authHeaderLength, _appReply, _privateMessage);
+ }
+
+ public void setApplicationReply(ApplicationReply applicationReply) {
+ _appReply = applicationReply;
+ }
+ public void setPrivateMessage(PrivateMessage privateMessage) {
+ _privateMessage = privateMessage;
+ }
+}
+
Added: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/ChangePasswordRequest.java
==============================================================================
--- (empty file)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/ChangePasswordRequest.java Tue Nov 2 20:52:57 2004
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed 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.kerberos.changepw.messages;
+
+import org.apache.kerberos.messages.*;
+import org.apache.kerberos.messages.application.*;
+
+public class ChangePasswordRequest extends AbstractPasswordMessage {
+
+ private ApplicationRequest _authHeader;
+ private PrivateMessage _privateMessage;
+
+ public ChangePasswordRequest(short messageLength, short versionNumber, short authHeaderLength,
+ ApplicationRequest authHeader, PrivateMessage privateMessage) {
+
+ super(messageLength, versionNumber, authHeaderLength);
+
+ _authHeader = authHeader;
+ _privateMessage = privateMessage;
+ }
+
+ public ApplicationRequest getAuthHeader() {
+ return _authHeader;
+ }
+ public PrivateMessage getPrivateMessage() {
+ return _privateMessage;
+ }
+}
+
Added: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/ChangePasswordRequestModifier.java
==============================================================================
--- (empty file)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/changepw/messages/ChangePasswordRequestModifier.java Tue Nov 2 20:52:57 2004
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed 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.kerberos.changepw.messages;
+
+import org.apache.kerberos.messages.*;
+import org.apache.kerberos.messages.application.*;
+
+public class ChangePasswordRequestModifier extends AbstractPasswordMessageModifier {
+
+ private ApplicationRequest _authHeader;
+ private PrivateMessage _privateMessage;
+
+ public ChangePasswordRequest getChangePasswordMessage() {
+
+ return new ChangePasswordRequest(_messageLength, _protocolVersionNumber,
+ _authHeaderLength, _authHeader, _privateMessage);
+ }
+
+ public void setAuthHeader(ApplicationRequest authHeader) {
+ _authHeader = authHeader;
+ }
+ public void setPrivateMessage(PrivateMessage privateMessage) {
+ _privateMessage = privateMessage;
+ }
+}
+