eap::config_method_with_cred::status >> eap::config_method_with_cred::status_t
This commit is contained in:
parent
106f49f50f
commit
6001bd3a49
@ -264,6 +264,25 @@ namespace eap
|
|||||||
|
|
||||||
class config_method_with_cred : public config_method
|
class config_method_with_cred : public config_method
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
///
|
||||||
|
/// Authentication attempt status
|
||||||
|
///
|
||||||
|
enum status_t {
|
||||||
|
status_success = 0, ///< Authentication succeeded
|
||||||
|
status_auth_failed, ///< Authentication failed
|
||||||
|
status_cred_invalid, ///< Invalid credentials
|
||||||
|
status_cred_expired, ///< Credentials expired
|
||||||
|
status_cred_changing, ///< Credentials are being changed
|
||||||
|
status_account_disabled, ///< Account is disabled
|
||||||
|
status_account_logon_hours, ///< Restricted account logon hours
|
||||||
|
status_account_denied, ///< Account access is denied
|
||||||
|
|
||||||
|
// Meta statuses
|
||||||
|
status_cred_begin = status_cred_invalid, ///< First credential related problem
|
||||||
|
status_cred_end = status_cred_changing + 1, ///< First problem, that is not credential related any more
|
||||||
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
/// Constructs configuration
|
/// Constructs configuration
|
||||||
@ -360,21 +379,7 @@ namespace eap
|
|||||||
bool m_allow_save; ///< Are credentials allowed to be saved to Windows Credential Manager?
|
bool m_allow_save; ///< Are credentials allowed to be saved to Windows Credential Manager?
|
||||||
bool m_use_cred; ///< Use configured credentials
|
bool m_use_cred; ///< Use configured credentials
|
||||||
std::unique_ptr<credentials> m_cred; ///< Configured credentials
|
std::unique_ptr<credentials> m_cred; ///< Configured credentials
|
||||||
|
status_t m_last_status; ///< Status of authentication the last time
|
||||||
enum status {
|
|
||||||
status_success = 0, ///< Authentication succeeded
|
|
||||||
status_auth_failed, ///< Authentication failed
|
|
||||||
status_cred_invalid, ///< Invalid credentials
|
|
||||||
status_cred_expired, ///< Credentials expired
|
|
||||||
status_cred_changing, ///< Credentials are being changed
|
|
||||||
status_account_disabled, ///< Account is disabled
|
|
||||||
status_account_logon_hours, ///< Restricted account logon hours
|
|
||||||
status_account_denied, ///< Account access is denied
|
|
||||||
|
|
||||||
// Meta statuses
|
|
||||||
status_cred_begin = status_cred_invalid, ///< First credential related problem
|
|
||||||
status_cred_end = status_cred_changing + 1, ///< First problem, that is not credential related any more
|
|
||||||
} m_last_status; ///< Status of authentication the last time
|
|
||||||
std::wstring m_last_msg; ///< Server message at the last authentication
|
std::wstring m_last_msg; ///< Server message at the last authentication
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -626,19 +631,19 @@ inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ eap::config &val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void operator<<(_Inout_ eap::cursor_out &cursor, _In_ const eap::config_method_with_cred::status &val)
|
inline void operator<<(_Inout_ eap::cursor_out &cursor, _In_ const eap::config_method_with_cred::status_t &val)
|
||||||
{
|
{
|
||||||
cursor << (unsigned char)val;
|
cursor << (unsigned char)val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline size_t pksizeof(_In_ const eap::config_method_with_cred::status &val)
|
inline size_t pksizeof(_In_ const eap::config_method_with_cred::status_t &val)
|
||||||
{
|
{
|
||||||
return pksizeof((unsigned char)val);
|
return pksizeof((unsigned char)val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ eap::config_method_with_cred::status &val)
|
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ eap::config_method_with_cred::status_t &val)
|
||||||
{
|
{
|
||||||
cursor >> (unsigned char&)val;
|
cursor >> (unsigned char&)val;
|
||||||
}
|
}
|
||||||
|
@ -436,7 +436,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// Constructs a notice pannel and set the title text
|
/// Constructs a notice pannel and set the title text
|
||||||
///
|
///
|
||||||
wxEAPCredentialWarningPanel(const eap::config_provider &prov, eap::config_method_with_cred::status status, wxWindow* parent);
|
wxEAPCredentialWarningPanel(const eap::config_provider &prov, eap::config_method_with_cred::status_t status, wxWindow* parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ wxEAPProviderLockedPanel::wxEAPProviderLockedPanel(const eap::config_provider &p
|
|||||||
// wxEAPCredentialWarningPanel
|
// wxEAPCredentialWarningPanel
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
wxEAPCredentialWarningPanel::wxEAPCredentialWarningPanel(const eap::config_provider &prov, eap::config_method_with_cred::status status, wxWindow* parent) : wxEAPNotePanel(parent)
|
wxEAPCredentialWarningPanel::wxEAPCredentialWarningPanel(const eap::config_provider &prov, eap::config_method_with_cred::status_t status, wxWindow* parent) : wxEAPNotePanel(parent)
|
||||||
{
|
{
|
||||||
// Load and set icon.
|
// Load and set icon.
|
||||||
winstd::library lib_shell32;
|
winstd::library lib_shell32;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user