in notification/app/notification/authentication/NotificationAuthAction.scala [14:28]
override def validApiKey(apiKey: String): Boolean = configuration.apiKeys.contains(apiKey) || configuration.newsstandRestrictedApiKeys.contains(apiKey)
override def isPermittedTopicType(apiKey: String): TopicType => Boolean = { topicType => {
def checkApiKeyForTopic(apiKeysForTopic: Set[String], configName: String): Boolean = {
val matched = apiKeysForTopic.contains(apiKey)
if (!matched) logger.warn(s"Api key cannot be used for $topicType. Expected in $configName keys")
matched
}
topicType match {
case Newsstand => checkApiKeyForTopic(configuration.newsstandRestrictedApiKeys, "newsstand restricted")
case _ => checkApiKeyForTopic(configuration.apiKeys, "api")
}
}
}