Class: Auth

Auth

new Auth(BotAccount, accountDetails, logger)

A class to handle all authentication functions for a bot account
Parameters:
Name Type Description
BotAccount
accountDetails
logger
Source:

Methods

_updateAccountDetails(newDetails)

This is meant to be a private method that updates account details securely (triggers an event to botAccount for a save, without revealing account information to preying eyes - can be bypassed, but simply makes it more challenging to be done without editing the the manager's code)
Parameters:
Name Type Description
newDetails
Source:

generateMobileAuthenticationCode() → {Error|String}

Generate two-factor-authentication code used for logging in.
Source:
Returns:
Type
Error | String

generateMobileConfirmationCode(time, tag) → {Error}

Parameters:
Name Type Description
time Current time of trade (Please use getUnixTime())
tag Type of confirmation required ("conf" to load the confirmations page, "details" to load details about a trade, "allow" to confirm a trade, "cancel" to cancel it.)
Source:
Returns:
Type
Error

getConfirmations(time, key, confirmationsCallback)

Get outstanding confirmations
Parameters:
Name Type Description
time
key
confirmationsCallback
Source:

getTime(timeOffset) → {*}

Get system time... for use with auth.
Parameters:
Name Type Description
timeOffset
Source:
Returns:
Type
*

getTimeOffset(timeOffset) → {*}

Get time offset using steam... for use with auth.
Parameters:
Name Type Description
timeOffset
Source:
Returns:
Type
*

logoutAccount(details)

Logout from chat of the botAccount
Parameters:
Name Type Description
details
Source:

setRevocationCode(revocationCode) → {String}

Sets the revocation code and returns it if successful (null if it fails validity checks).
Parameters:
Name Type Description
revocationCode
Source:
Returns:
Type
String

Type Definitions

loginAccount(details)

Login to account using supplied details (2FactorCode, authcode, or captcha)
Parameters:
Name Type Description
details
Source: