예제 #1
0
        public IDBResponse Authenticate(IAuthenticationOperation operation)
        {
            var response = operation.CreateResponse() as AuthenticationResponse;

            try
            {
                AuthToken nextAuthToken = SecurityManager.Authenticate(_nodeContext.LocalShardName, operation, SSPIUtility.IsLocalServer(operation.Address.IpAddress), IsDistributorSession ? "NT SERVICE\\" + MiscUtil.NOSDB_DISTSVC_NAME : null);
                if (response != null)
                {
                    response.ServerToken = nextAuthToken;
                    return(response);
                }
            }
            catch (SecurityException noSSecurityException)
            {
                if (response != null)
                {
                    response.ErrorCode = noSSecurityException.ErrorCode;
                    return(response);
                }
            }
            return(response);
        }