getValidation

Validates an access key, retrieving information about it.

Note: Must be called from inside a Fiber.

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

Parameters

plugin TwitchPlugin

The current TwitchPlugin.

authorisationHeader string

"OAuth xxx" authorisation header.

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