Q:

ServiceStack's Config.AdminAuthSecret is not working

I have a service using the Authorize attribute I would like to use ServiceStack's AdminAuthSecret feature but it isn't working.
I have set the  AdminAuthSecret as shown below:
public void Configure(Container container, IAppHost host)
        {
            // more code...
            host.Config.AdminAuthSecret = "9999";
            // more code...
        }

Therefore I have checked out ServiceStack's source code in order to debug it and I have set a breakpoint at following place:
ServiceStackHost class:
 public bool HasValidAuthSecret(IRequest httpReq)
        {
            if (Config.AdminAuthSecret != null)
            {
                var authSecret = httpReq.GetParam("authsecret");
                return authSecret == Config.AdminAuthSecret;
            }

            return false;
        }

But the breakpoint never hits. Any idea what's wrong? 

A:

Note: the API to set the configuration in ServiceStack is:
SetConfig(new HostConfig {
    AdminAuthSecret = "9999"
});

Config.AdminAuthSecret was used to by-pass Services protected with RequiredRole and RequiredPermission attributes. I've just extended it to by-pass [Authenticate] Services as well in this commit which will be available from v4.0.39+ that's now available on MyGet.

