We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right now, this message seems to be returned by the API for no key being specified and providing a key the server doesn't know about:
Access Denied. Please sign up for an account at https://rubygems.org
If a key is specified, but invalid, it would be nice for it to return a message suggesting gem signin.
gem signin
(Split from rubygems/rubygems#7595.)
I'd expect to suggest signing in.
It currently suggests to signing up.
Returning the current message if no key is provided, but something closer to this if the key is invalid:
Access Denied. Your key is invalid. Check your keys at https://rubygems.org/profile/api_keys or sign in with gem signin
Browser and its version: N/A (API behavior) RubyGems version: definitely 3.3.15, I suspect any recent version
The exact string is defined at https://github.com/rubygems/rubygems.org/blob/14d5bba/config/locales/en.yml#L30.
The function that returns this value is Api::BaseController#authenticate_with_api_key:
Api::BaseController#authenticate_with_api_key
rubygems.org/app/controllers/api/base_controller.rb
Lines 97 to 105 in 14d5bba
I suspect but have not confirmed that you may be able to determine which situation it is based on if request.headers["Authorization"] is nil.
request.headers["Authorization"]
nil
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Right now, this message seems to be returned by the API for no key being specified and providing a key the server doesn't know about:
If a key is specified, but invalid, it would be nice for it to return a message suggesting
gem signin
.(Split from rubygems/rubygems#7595.)
Steps to Reproduce
gem signin
.Expected Behavior
I'd expect to suggest signing in.
Current Behavior
It currently suggests to signing up.
Possible Solution
Returning the current message if no key is provided, but something closer to this if the key is invalid:
Environment
Browser and its version: N/A (API behavior)
RubyGems version: definitely 3.3.15, I suspect any recent version
Additional Context
The exact string is defined at https://github.com/rubygems/rubygems.org/blob/14d5bba/config/locales/en.yml#L30.
The function that returns this value is
Api::BaseController#authenticate_with_api_key
:rubygems.org/app/controllers/api/base_controller.rb
Lines 97 to 105 in 14d5bba
I suspect but have not confirmed that you may be able to determine which situation it is based on if
request.headers["Authorization"]
isnil
.The text was updated successfully, but these errors were encountered: