Skip to content
New issue

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

Move validation until after the block is called #5

Closed
wants to merge 5 commits into from

Conversation

ollym
Copy link

@ollym ollym commented Jan 18, 2023

For those of us who prefer to use Rails.application.credentials to ENV

This would allow for config setting being done like:

Passkit.configure do |config|
  config.web_service_host = Rails.application.credentials.passkit_web_service_host
  config.certificate_key = Rails.application.credentials.passkit_certificate_key
  // etc...
end

Copy link
Owner

@coorasse coorasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a great improvement, thanks! I'd just like to keep the default ENV["PASSKIT_DASHBOARD_USERNAME"] and ENV["PASSKIT_DASHBOARD_PASSWORD"] that now are not used anymore.


DEFAULT_AUTHENTICATION = proc do
authenticate_or_request_with_http_basic("Passkit Dashboard. Login required") do |username, password|
username == ENV["PASSKIT_DASHBOARD_USERNAME"] && password == ENV["PASSKIT_DASHBOARD_PASSWORD"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are loosing the default taken from the ENV variable with this change. Can you please set both dashboard_username and dashboard_password to the ENV variables as default?

@bilouw
Copy link

bilouw commented Apr 25, 2023

Hi !

Could this be merge please ? It would be a great if we could set these variables in rails credentials !

@coorasse
Copy link
Owner

I am open to recosider this with the required changes. As of now, I'll close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants