Class NarutoCredentials

Description

This class defines the authentication framework for the API.

Please read the section in the Developer Guide on authentication for information on how this works.

Located in /classes/narutoCredentials.php (line 23)


	
			
Method Summary
string exportAuthToken (string $salt)
string getUserName ()
void importAuthToken (string $token, string $salt)
void setCredentials (string $username, string $password)
boolean validateUser (string $password)
Methods
exportAuthToken (line 70)

This method converts the credentials into a single token for

transfer to a remote server. The salt key that is unique to the user's request would only be known by the client and the server that will receive it. Often the salt is constructed from the request parameters. This is important so that the salt cannot be hijacked for any other action.

  • return: authorization token.
  • exception: NarutoException if credientials have not been set.
  • access: public
string exportAuthToken (string $salt)
  • string $salt: a request-unique repeatable string.
getUserName (line 31)

Gets the user name.

  • return: the user name.
  • access: public
string getUserName ()
importAuthToken (line 94)

Imports a previously exported authorization token. This call allows for user validation. This is called by the server-side.

  • exception: NarutoException if token is invalid.
  • access: public
void importAuthToken (string $token, string $salt)
  • string $salt: the same salt that was used to create the token.
  • string $token: authorization token from the exportAuthToken call.
setCredentials (line 47)

This method specifies the credentials to use for message board authorizations.

  • access: public
void setCredentials (string $username, string $password)
  • string $username: The user's message board account name invoking the web service.
  • string $password: The user's message board account password. Most message boards save passwords encrypted. The password used here, should be the same one as the message board stores it.
validateUser (line 134)

Valitates a user's password. This should be called by the message board.

  • return: true if user's passowrd looks correct, false otherwise.
  • exception: NarutoException if credentials were not set OR no token imported.
  • access: public
boolean validateUser (string $password)
  • string $password: the user's password as when credentials were set.

Documentation generated on Sun, 26 Oct 2008 16:41:10 -0400 by phpDocumentor 1.4.2