AuthService

URL: http://landgrab.net/landgrab/services/AuthService
WSDL: http://landgrab.net/landgrab/services/AuthService?wsdl

The AuthService has methods for initiating sessions and authenticating users.

Methods

initiateSession(developerToken)

Arguments:
developerToken (xsd:string) Your developer token

Returns: A string, one of the following:
"INVALID TOKEN"
"TOKEN HAS BEEN DISABLED"
The session key to use in subsequent calls. This is a randomly-generated 32 character string.

This method initiates a session with the client. This method must be called prior to calling any other service. The session key will be returned from this call (or an error string is the developer token is invalid).

The default session timeout is 2 hours. After calling this method, if you do not make any other calls within 2 hours, you must call initiateSession again.

authenticateUser(sessionKey, username, password, clearText)

Arguments:
sessionKey (xsd:string) The session key obtained from the initiateSession call
username (xsd:string) The username (login name) of the user being authenticated
password (xsd:string) The password (clear text) of the user being authenticated
clearText (xsd:boolean) Whether or not you are passing in an encrypted password. If this is false, the password must be encrypted using MD5.

Returns: nothing

This method will elevate the privileges for subsequent method calls to be authenticated with the given user. Some methods require an authenticated user (obtaining private messages, or obtaining a user's game list, for example). This method must be called prior to these. The authenticated user will be used for all subsequent calls until you either call authenticateUser with a different user, or call the logoutUser method.

You can use the getAuthenticatedUserName method to see which user you currently have authenticated.

getAuthenticatedUserName(String sessionKey)

Arguments:
sessionKey (xsd:string) The session key obtained from the initiateSession call

Returns: A string, the username of the currently-authenticated user, or
if no user is currently authenticated, the string "NO AUTHENTICATED USER"
is returned.

This method will return the username of the currently authenticated user. If there is no user currently authenticated, the text "NO AUTHENTICATED USER" is returned.

 

logoutUser(String sessionKey)

Arguments:
sessionKey (xsd:string) The session key obtained from the initiateSession call

Returns: nothing

This method will unauthenticate the currently-authenticated user if one exists. Calling this method when there is no authenticated user does nothing.