示例#1
0
 //UPGRADE_NOTE: Synchronized keyword was removed from method 'validateIdentity'. Lock expression was added. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1027"'
 protected internal virtual bool validateIdentity(System.String authenticateId, OTPAuthenticator a)
 {
     lock (this)
     {
         // Do a kind of mutually exclusive bit
         if (authenticators[authenticateId] != null)
         {
             return false;
         }
         SupportClass.PutElement(authenticators, authenticateId, a);
         return true;
     }
 }
示例#2
0
        internal virtual OTPAuthenticator startAuthentication(System.String authorizeId, System.String authenticateId, System.String password)
        {
            UserDatabase db = userDatabase.getUser(authenticateId);

            if (db == null)
            {
                throw new SASLException("User OTP data not found");
            }

            OTPAuthenticator a = new OTPAuthenticator(this, db, password, authorizeId, authenticateId);
            return a;
        }
示例#3
0
        // Used only for init calls
        internal virtual OTPAuthenticator startAuthentication(System.String authorizeId, System.String authenticateId, System.String password, System.String newAlgorithm, System.String newHash, System.String newSeed, System.String newSequence)
        {
            UserDatabase db = userDatabase.getUser(authenticateId);

            if (db == null)
            {
                throw new SASLException("User OTP data not found");
            }

            newSeed = newSeed.ToLower();
            OTPAuthenticator a = new OTPAuthenticator(this, db, password, authorizeId, authenticateId, newAlgorithm, newHash, newSeed, newSequence);
            return a;
        }
示例#4
0
        public virtual void startChannel(Channel channel, System.String encoding, System.String data)
        {
            log.debug("SASL-OTP Start Channel CCL");

            clearCredential(channel.Session, this);

            OTPAuthenticator temp = new OTPAuthenticator(this);
            try
            {
                channel.setRequestHandler(temp);
                temp.started(channel);
            }
            catch (SASLException x)
            {
                //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.getMessage' may return a different value. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1043"'
                throw new StartChannelException(BEEPError.CODE_REQUESTED_ACTION_NOT_TAKEN, x.Message);
            }
            log.debug("Started an SASL-OTP Channel");
        }