Hi,
I have had API key auth repo in use for a week or two, and this afternoon I started getting the following exception on any service protected with the AuthenticateAttribute:
ServiceStack.HttpError: ApiKey does not exist
 at ServiceStack.Auth.ApiKeyAuthProvider.ValidateApiKey(ApiKey apiKey)
 at ServiceStack.Auth.ApiKeyAuthProvider.PreAuthenticateWithApiKey(IRequest req, IResponse res, ApiKey apiKey)
 at ServiceStack.Auth.ApiKeyAuthProvider.PreAuthenticate(IRequest req, IResponse res)
 at ServiceStack.ServiceStackHost.ApplyPreAuthenticateFilters(IRequest httpReq, IResponse httpRes)
 at ServiceStack.ServiceExtensions.GetSession(IRequest httpReq, Boolean reload)
If I look at SessionAs - it is showing Authenticated = true.
My Global.asax.cs hasn’t changed and has the following:
Plugins.Add(new AuthFeature(() => new AuthUserSession(),
new IAuthProvider[]
{
new ApiKeyAuthProvider() {RequireSecureConnection = false, Environments = new []{"live"}, ServiceRoutes = new Dictionary<Type, string[]>()},
new CredentialsAuthProvider (),
})
);
ApiKey is not being passed as a param into the service and keys have no expiry date. Using version 5.0.3. Any ideas?
G