I am very very thankful you can supply me such rich information. I have read them carefully and found they are not comfort my situation. The Central Auth System I use is not developed by me. So I must do my project in its framework. When one user login in a application such like a forum, the forum would ask the central auth system if the username and password which supplied by user is match. When this is okay, it would call a function which provided by this central auth system. This function will access the myapi.php in each applications which configured with this central auth system and pass User_ID by POST. So I have to write a myapi.php for mediawiki to create a session with the uid it supplied. I am not good at English and I hope you can understand my meanning. thx!
Ok. I understand the requirement now. Note that the last extension I linked to has code that creates a session for a user. You can use it as an example. It also has an example of creating a user in the database, which you'll need to do as well.
Note that this sounds like a really insecure system if done improperly. I hope the central auth server has some way of authenticating that POST request, or anyone would be able to grant themselves a session.
V/r,
Ryan Lane