mirror of
https://github.com/falk-werner/webfuse-provider
synced 2026-03-02 04:09:18 +00:00
change: make credentials const in wf_authenticate_fn (breaking change)
This commit is contained in:
@@ -23,17 +23,17 @@ void set_authenticator(size_t i, Authenticator * authenticator)
|
||||
g_authenticators[i] = authenticator;
|
||||
}
|
||||
|
||||
bool authenticate(struct wf_credentials * creds, void * user_data)
|
||||
bool authenticate(struct wf_credentials const * creds, void * user_data)
|
||||
{
|
||||
return g_authenticators[0]->authenticate(creds, user_data);
|
||||
}
|
||||
|
||||
bool authenticate_1(struct wf_credentials * creds, void * user_data)
|
||||
bool authenticate_1(struct wf_credentials const * creds, void * user_data)
|
||||
{
|
||||
return g_authenticators[1]->authenticate(creds, user_data);
|
||||
}
|
||||
|
||||
bool authenticate_2(struct wf_credentials * creds, void * user_data)
|
||||
bool authenticate_2(struct wf_credentials const * creds, void * user_data)
|
||||
{
|
||||
return g_authenticators[2]->authenticate(creds, user_data);
|
||||
}
|
||||
|
||||
@@ -12,22 +12,22 @@ class Authenticator
|
||||
public:
|
||||
virtual ~Authenticator() { }
|
||||
virtual bool authenticate(
|
||||
struct wf_credentials * credentials,
|
||||
struct wf_credentials const * credentials,
|
||||
void * user_data) = 0;
|
||||
};
|
||||
|
||||
class MockAuthenticator: public Authenticator
|
||||
{
|
||||
public:
|
||||
MOCK_METHOD2(authenticate, bool (struct wf_credentials * credentials, void * user_data));
|
||||
MOCK_METHOD2(authenticate, bool (struct wf_credentials const * credentials, void * user_data));
|
||||
};
|
||||
|
||||
void set_authenticator(Authenticator * authenticator);
|
||||
void set_authenticator(size_t index, Authenticator * authenticator);
|
||||
|
||||
bool authenticate(struct wf_credentials * creds, void * user_data);
|
||||
bool authenticate_1(struct wf_credentials * creds, void * user_data);
|
||||
bool authenticate_2(struct wf_credentials * creds, void * user_data);
|
||||
bool authenticate(struct wf_credentials const * creds, void * user_data);
|
||||
bool authenticate_1(struct wf_credentials const * creds, void * user_data);
|
||||
bool authenticate_2(struct wf_credentials const * creds, void * user_data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user