Hi Chris: Thank you for your answer. The external site is in another domain, but it's an specified web application for authentication. When I login in the external site, it will redirect to wiki with its user info. I have seen an extension OpenID which I think works similiarly with my requirement. OpenID will hijack wiki's login, and use its returned user as an $wgUser. However, It seems quite complicated to replace wiki's internal user login system. I have not fully understood the principle by now. And I will try it with my best.
Best Regards!