getValidation

Validates an access key, retrieving information about it.

Note: Must be called from inside a Fiber.

version(TwitchSupport && WithTwitchPlugin)
package
getValidation
(,
string authToken
,
const bool async
,
const string caller = __FUNCTION__
)

Parameters

plugin TwitchPlugin

The current TwitchPlugin.

authToken string

Authorisation token to validate.

async bool

Whether or not the validation should be done asynchronously, using fibers.

caller string

Name of the calling function.

Return Value

Type: auto

A Voldemort struct with clientID, login, userID and expiresIn members.

Throws

InvalidCredentialsException

on invalid credentials. UnexpectedJSONException on unexpected JSON received. HTTPQueryException on other failure.

See Also