How to skip auth when a orgin is from particular doamin

Hey, I need a small help I want to use tmpauthenticator.TmpAuthenticator if origin is from example.com.
else use normal Authenticator. pls, any suggestions.