JD2022-TU1/main/extern/Hue/libhuestream/huestream/connect/DefaultAuthenticator.h

30 lines
955 B
C++

/*******************************************************************************
Copyright © 2017 Philips Lighting Holding B.V.
All Rights Reserved.
********************************************************************************/
#ifndef LIBHUESTREAM_DEFAULTAUTHENTICATOR_H
#define LIBHUESTREAM_DEFAULTAUTHENTICATOR_H
#include <huestream/common/http/IHttp.h>
#include "ConnectionFlow.h"
namespace huestream {
namespace connectionflow {
class DefaultAuthenticator : public IBridgeAuthenticator
{
public:
DefaultAuthenticator();
void Authenticate(BridgePtr bridge, AutenticateCallbackHandler cb) override;
void Abort();
protected:
shared_ptr<IHttp> _http;
void ParseCredentials(JSONNode root, BridgePtr bridge);
void CheckClientkeyAvailable(JSONNode root, BridgePtr bridge);
};
}
}
#endif //LIBHUESTREAM_DEFAULTAUTHENTICATOR_H