in pan-domain-auth-verification/src/main/scala/com/gu/pandomainauth/service/CryptoConf.scala [33:43]
private[CryptoConf] def acceptsActiveKeyFrom(other: Verification): Boolean = acceptedPublicKeys.contains(other.activePublicKey)
def decode[A](f: PublicKey => Option[A]): Option[A] = {
(for {
(key, keyId) <- acceptedKeysWithIds
result <- f(key)
} yield {
NonActiveKeyMonitoring.instance.monitor(keyId, activeKeyId)
result
}).headOption
}