Class SpazBasicAuth

SpazBasicAuth

Defined in: spazauth.js.

Class Summary
Constructor Attributes Constructor Name and Description
 

Construct a new basic authentication object.

Method Summary
Method Attributes Method Name and Description
 
authorize(username, password, onComplete)

Set username and password of account to access service.

 

 

 
load(pickle)

Load basic auth credentials from a serialized string

 
save()

Save basic auth credentials into a serialized string

 

Returns the authentication header

Class Detail

SpazBasicAuth()

Construct a new basic authentication object.

Method Detail

{Boolean} authorize(username, password, onComplete)

Set username and password of account to access service.

Parameters:
{string} username
{string} password
{function} onComplete Optional
a callback to fire when complete. Currently just passed TRUE all the time; for compatibility with oAuth need for callbacks
Returns:
{Boolean} true. ALWAYS returns true!

getPassword()

getUsername()

{boolean} load(pickle)

Load basic auth credentials from a serialized string

Parameters:
{string} pickle
the serialized data string returned by save()
Returns:
{boolean} true if successfully loaded

{string} save()

Save basic auth credentials into a serialized string

Returns:
{string} serialized string

{string} signRequest()

Returns the authentication header

Returns:
{string} Authentication header value