|
KiCad PCB EDA Suite
|
#include <oauth_loopback_server.h>
Public Member Functions | |
| OAUTH_LOOPBACK_SERVER (wxEvtHandler *aOwner, const wxString &aCallbackPath, const wxString &aExpectedState) | |
| ~OAUTH_LOOPBACK_SERVER () override | |
| bool | Start () |
| unsigned short | GetPort () const |
| wxString | GetRedirectUri () const |
Static Public Member Functions | |
| static bool | ParseAuthorizationResponse (const wxString &aRequestLine, const wxString &aExpectedPath, const wxString &aExpectedState, OAUTH_AUTHORIZATION_RESPONSE &aResponse, wxString &aError) |
Private Member Functions | |
| void | OnSocketEvent (wxSocketEvent &aEvent) |
| void | OnTimeout (wxTimerEvent &aEvent) |
| void | HandleClient (wxSocketBase *aClient) |
| void | SendHttpResponse (wxSocketBase *aClient, bool aSuccess) |
| void | Finish (bool aSuccess) |
| void | Shutdown () |
Private Attributes | |
| wxEvtHandler * | m_owner |
| wxString | m_callbackPath |
| wxString | m_expectedState |
| std::unique_ptr< wxSocketServer > | m_server |
| wxTimer | m_timeout |
| unsigned short | m_port |
| bool | m_done |
| std::optional< OAUTH_AUTHORIZATION_RESPONSE > | m_response |
Definition at line 45 of file oauth_loopback_server.h.
| OAUTH_LOOPBACK_SERVER::OAUTH_LOOPBACK_SERVER | ( | wxEvtHandler * | aOwner, |
| const wxString & | aCallbackPath, | ||
| const wxString & | aExpectedState ) |
Definition at line 56 of file oauth_loopback_server.cpp.
References m_callbackPath, m_done, m_expectedState, m_owner, m_port, m_timeout, and OnTimeout().
|
override |
Definition at line 69 of file oauth_loopback_server.cpp.
References m_timeout, OnSocketEvent(), OnTimeout(), and Shutdown().
|
private |
Definition at line 268 of file oauth_loopback_server.cpp.
References m_done, m_owner, m_response, m_timeout, and Shutdown().
Referenced by HandleClient(), and OnTimeout().
|
inline |
Definition at line 53 of file oauth_loopback_server.h.
References m_port.
| wxString OAUTH_LOOPBACK_SERVER::GetRedirectUri | ( | ) | const |
Definition at line 107 of file oauth_loopback_server.cpp.
References m_callbackPath, and m_port.
Referenced by BOOST_AUTO_TEST_CASE().
|
private |
Definition at line 198 of file oauth_loopback_server.cpp.
References Finish(), m_callbackPath, m_expectedState, m_response, ParseAuthorizationResponse(), and SendHttpResponse().
Referenced by OnSocketEvent().
|
private |
Definition at line 179 of file oauth_loopback_server.cpp.
References HandleClient(), and m_server.
Referenced by Start(), and ~OAUTH_LOOPBACK_SERVER().
|
private |
Definition at line 191 of file oauth_loopback_server.cpp.
References Finish().
Referenced by OAUTH_LOOPBACK_SERVER(), and ~OAUTH_LOOPBACK_SERVER().
|
static |
Definition at line 113 of file oauth_loopback_server.cpp.
References _, OAUTH_AUTHORIZATION_RESPONSE::code, OAUTH_AUTHORIZATION_RESPONSE::error, OAUTH_AUTHORIZATION_RESPONSE::error_description, path, and OAUTH_AUTHORIZATION_RESPONSE::state.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and HandleClient().
|
private |
Definition at line 244 of file oauth_loopback_server.cpp.
Referenced by HandleClient().
|
private |
Definition at line 291 of file oauth_loopback_server.cpp.
References m_server.
Referenced by Finish(), and ~OAUTH_LOOPBACK_SERVER().
| bool OAUTH_LOOPBACK_SERVER::Start | ( | ) |
Definition at line 79 of file oauth_loopback_server.cpp.
References m_port, m_server, m_timeout, and OnSocketEvent().
Referenced by BOOST_AUTO_TEST_CASE().
|
private |
Definition at line 71 of file oauth_loopback_server.h.
Referenced by GetRedirectUri(), HandleClient(), and OAUTH_LOOPBACK_SERVER().
|
private |
Definition at line 76 of file oauth_loopback_server.h.
Referenced by Finish(), and OAUTH_LOOPBACK_SERVER().
|
private |
Definition at line 72 of file oauth_loopback_server.h.
Referenced by HandleClient(), and OAUTH_LOOPBACK_SERVER().
|
private |
Definition at line 70 of file oauth_loopback_server.h.
Referenced by Finish(), and OAUTH_LOOPBACK_SERVER().
|
private |
Definition at line 75 of file oauth_loopback_server.h.
Referenced by GetPort(), GetRedirectUri(), OAUTH_LOOPBACK_SERVER(), and Start().
|
private |
Definition at line 77 of file oauth_loopback_server.h.
Referenced by Finish(), and HandleClient().
|
private |
Definition at line 73 of file oauth_loopback_server.h.
Referenced by OnSocketEvent(), Shutdown(), and Start().
|
private |
Definition at line 74 of file oauth_loopback_server.h.
Referenced by Finish(), OAUTH_LOOPBACK_SERVER(), Start(), and ~OAUTH_LOOPBACK_SERVER().