in pan-domain-auth-play/src/main/scala/com/gu/pandomainauth/action/Actions.scala [344:350]
def responseWithSystemCookie(response: Future[Result], authedUser: AuthenticatedUser): Future[Result] =
if (authedUser.authenticatedIn(system)) {
response
} else {
logger.debug(s"user ${authedUser.user.email} from other system valid: adding validity in $system.")
response.map(includeSystemInCookie(authedUser))
}