backend: Dedup some code for temporary auth subjects (MR #18 rebased)
MR #18 rebased.
This isOriginal description from MR #18:
See https://bugs.freedesktop.org/show_bug.cgi?id=23867which turned up from
git annotate` here.
I was reading this code and noticed it was duplicated.