def get_token(request):
if (not request.META.get(header_name_to_django(auth_token_settings.HEADER_NAME)) and<EOL>config.CHAMBER_MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME):<EOL><INDENT>ovetaker_auth_token = request.COOKIES.get(config.CHAMBER_MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME)<EOL>token = get_object_or_none(Token, key=ovetaker_auth_token, is_active=True)<EOL>if utils.get_user_from_token(token).is_authenticated():<EOL><INDENT>return token<EOL><DEDENT><DEDENT>return utils.get_token(request)<EOL>
Returns the token model instance associated with the given request token key.
If no user is retrieved AnonymousToken is returned.