+ Reply to Thread
Results 1 to 4 of 4

Thread: How do I get user's credentials using authtoken?

  1. #1

    Default How do I get user's credentials using authtoken?

    Hi again!

    Well, simple task (as it seems to be) to integrate MT with phpBB forum (using with autologin) became a nightmare. In order to get an automatic login to work it is necessary to obtain a user name. We have only authtoken cookie if user is logged in not using SSO (then we have also username as environment variable but who cares?). I did not find any kind of API to get user credentials using authtoken. At last do you guys have some API to check if authtoken is valid?

    Thanx in advice.
    Last edited by marginal; 02-22-2010 at 10:14 AM.

  2. #2
    Join Date
    Mar 2008
    Posts
    1,630

    Default

    As SteveB informed me in another thread, you can use this call: http://developer.mindtouch.com/@api/deki/users/current to find out the identity of the current user based on the authtoken in the cookie. Try it and see if the return gives you all the info you need (basically, it gives everything I can think of other than password).

    If the cookie is not current the call will return the user as "anonymous".

  3. #3

    Smile

    Quote Originally Posted by neilw View Post
    As SteveB informed me in another thread, you can use this call: http://developer.mindtouch.com/@api/deki/users/current to find out the identity of the current user based on the authtoken in the cookie. Try it and see if the return gives you all the info you need (basically, it gives everything I can think of other than password).

    If the cookie is not current the call will return the user as "anonymous".
    Thanks a lot!
    I wonder why this call did not added in API reference? Anyway - that's all I need for now.

  4. #4
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    The API is documented here: GET:users/{userid} . The valid values for userid are the ID of the user, "=" followed by the user name, or "current" for the current user.
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts