Skip to content

Commit

Permalink
ApiKeyAuthAttributeSample fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tugberkugurlu committed Mar 6, 2012
1 parent ba06e59 commit 39c9b6d
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -42,7 +42,7 @@ public class InMemoryApiKeyAuthorizer : IApiKeyAuthorizer {
public bool IsAuthorized(string apiKey, string[] roles) {

if(_validApiUsers.Any(x =>
x.ApiKey == apiKey && x.Roles.Where(r => roles.Contains(r.Name)).Count() > 0)) {
x.ApiKey == apiKey && x.Roles != null && x.Roles.Any(r => roles.Contains(r.Name)))) {

return true;
}
Expand Down

0 comments on commit 39c9b6d

Please sign in to comment.