Refactor DependencyProxy::AuthTokenService.user_or_deploy_token_from_jwt

DependencyProxy::AuthTokenService.user_or_deploy_token_from_jwt is used in two places:

  • in Gitlab::Auth::RequestAuthenticator, to return an . discriminator for rack-attack.
  • in the Groups::DependencyProxy controllers, to return the user or the deploy token making the request.

In the #434291 (closed) refactoring, and after the Feature Flag packages_dependency_proxy_pass_token_to_policy has been rolled out, the Groups::DependencyProxy controllers will no longer use .user_or_deploy_token_from_jwt and will instead use .user_or_token_from_jwt.

We can rename .user_or_deploy_token_from_jwt to something like request-throttling-discriminator or something similar. This makes it obvious that the method has a different use and different purpose from user_or_token_from_jwt, and we should not attempt to use them interchangeably.