public string RequestAuthCode()
{
lock (OAuthTicketLock)
{
ThrowIfDisposed();
if (Config.OAuthRefreshToken == null)
{
if (OAuthCodePollURL == null)
{
throw new InvalidOperationException("Print Proxy must first be registered.");
}
Config.OAuthEmail = RequestAuthCode(OAuthCodePollURL);
Config.OAuthRefreshToken = OAuthTicket.RefreshToken;
OAuthCodePollURL = null;
return Config.OAuthEmail;
}
else
{
throw new InvalidOperationException("Already registered");
}
}
}