keyExtrasLine.clean();
}
+bool
+Auth::SchemeConfig::configured() const
+{
+ return (authenticateProgram && authenticateChildren.n_max != 0);
+}
+
bool
Auth::SchemeConfig::isCP1251EncodingAllowed(const HttpRequest *request)
{
\retval false Not configured or Configuration Error.
* No other module functions except Shutdown/Dump/Parse/FreeConfig will be called by Squid.
*/
- virtual bool configured() const = 0;
+ virtual bool configured() const;
/**
* Shutdown just the auth helpers.
bool
Auth::Basic::Config::configured() const
{
- if ((authenticateProgram != nullptr) && (authenticateChildren.n_max != 0) && !realm.isEmpty()) {
- debugs(29, 9, "returning configured");
- return true;
- }
-
- debugs(29, 9, "returning unconfigured");
- return false;
+ return (SchemeConfig::configured() && !realm.isEmpty());
}
const char *
bool
Auth::Digest::Config::configured() const
{
- if ((authenticateProgram != nullptr) &&
- (authenticateChildren.n_max != 0) &&
- !realm.isEmpty() && (noncemaxduration > -1))
- return true;
-
- return false;
+ return (SchemeConfig::configured() && !realm.isEmpty() && noncemaxduration > -1);
}
/* add the [www-|Proxy-]authenticate header on a 407 or 401 reply */
return authnegotiate_initialised == 1;
}
-bool
-Auth::Negotiate::Config::configured() const
-{
- if (authenticateProgram && (authenticateChildren.n_max != 0)) {
- debugs(29, 9, "returning configured");
- return true;
- }
-
- debugs(29, 9, "returning unconfigured");
- return false;
-}
-
void
Auth::Negotiate::Config::fixHeader(Auth::UserRequest::Pointer auth_user_request, HttpReply *rep, Http::HdrType reqType, HttpRequest * request)
{
{
public:
bool active() const override;
- bool configured() const override;
Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm) override;
void done() override;
void rotateHelpers() override;
return authntlm_initialised == 1;
}
-bool
-Auth::Ntlm::Config::configured() const
-{
- if ((authenticateProgram != nullptr) && (authenticateChildren.n_max != 0)) {
- debugs(29, 9, "returning configured");
- return true;
- }
-
- debugs(29, 9, "returning unconfigured");
- return false;
-}
-
/* NTLM Scheme */
void
{
public:
bool active() const override;
- bool configured() const override;
Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm) override;
void done() override;
void rotateHelpers() override;