You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2006/05/05 07:23:44 UTC
svn commit: r399969 - in
/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication:
AuthenticationServiceChain.java VerifyPolicy.java
Author: akarasulu
Date: Thu May 4 22:23:44 2006
New Revision: 399969
URL: http://svn.apache.org/viewcvs?rev=399969&view=rev
Log:
checking in merged changes from commit revision 399966 on 1.0 apacheds branch
Added:
directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/VerifyPolicy.java
- copied, changed from r399966, directory/branches/apacheds/1.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/VerifyPolicy.java
Modified:
directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationServiceChain.java
Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationServiceChain.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationServiceChain.java?rev=399969&r1=399968&r2=399969&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationServiceChain.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationServiceChain.java Thu May 4 22:23:44 2006
@@ -29,6 +29,7 @@
addLast( "monitorRequest", new MonitorRequest() );
addLast( "configureAuthenticationChain", new ConfigureAuthenticationChain() );
addLast( "getClientEntry", new GetClientEntry() );
+ addLast( "verifyPolicy", new VerifyPolicy() );
addLast( "preAuthenticationChain", new PreAuthenticationChain() );
addLast( "getServerEntry", new GetServerEntry() );
addLast( "getSessionKey", new GetSessionKey() );
Copied: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/VerifyPolicy.java (from r399966, directory/branches/apacheds/1.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/VerifyPolicy.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/VerifyPolicy.java?p2=directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/VerifyPolicy.java&p1=directory/branches/apacheds/1.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/VerifyPolicy.java&r1=399966&r2=399969&rev=399969&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/VerifyPolicy.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/VerifyPolicy.java Thu May 4 22:23:44 2006
@@ -5,20 +5,21 @@
import org.apache.directory.server.kerberos.shared.exceptions.ErrorType;
import org.apache.directory.server.kerberos.shared.exceptions.KerberosException;
import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
-import org.apache.directory.server.protocol.shared.chain.Context;
-import org.apache.directory.server.protocol.shared.chain.impl.CommandBase;
+import org.apache.mina.common.IoSession;
+import org.apache.mina.handler.chain.IoHandlerCommand;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
-public class VerifyPolicy extends CommandBase
+public class VerifyPolicy implements IoHandlerCommand
{
/** the log for this class */
// private static final Logger log = LoggerFactory.getLogger( VerifyPolicy.class );
+ private String contextKey = "context";
+
-
- public boolean execute( Context context ) throws Exception
+ public void execute( NextCommand next, IoSession session, Object message ) throws Exception
{
- AuthenticationContext authContext = ( AuthenticationContext ) context;
+ AuthenticationContext authContext = ( AuthenticationContext ) session.getAttribute( getContextKey() );
PrincipalStoreEntry entry = authContext.getClientEntry();
if ( entry.isDisabled() )
@@ -35,7 +36,12 @@
{
throw new KerberosException( ErrorType.KDC_ERR_CLIENT_REVOKED );
}
+ next.execute( session, message );
+ }
+
- return CONTINUE_CHAIN;
+ public String getContextKey()
+ {
+ return ( this.contextKey );
}
}