ses-proxy 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,8 @@ helpers do
13
13
 
14
14
  def authorized?
15
15
  @auth ||= Rack::Auth::Basic::Request.new(request.env)
16
- @auth.provided? && @auth.basic? && @auth.credentials && @auth.credentials == [SesProxy::Conf.get[:smtp_auth][:user], SesProxy::Conf.get[:smtp_auth][:password]]
16
+ available_users = SesProxy::Conf.get[:http_auth].map{|user| [user[:user],user[:password]]}
17
+ @auth.provided? && @auth.basic? && @auth.credentials && available_users.include?(@auth.credentials)
17
18
  end
18
19
  end
19
20
 
@@ -6,6 +6,13 @@
6
6
  :smtp_auth:
7
7
  :user: smtp_user
8
8
  :password: smtp_pass
9
+ :http_auth:
10
+ -
11
+ :user: http_user_1
12
+ :password: http_password_1
13
+ -
14
+ :user: http_user_2
15
+ :password: http_password_2
9
16
  :test:
10
17
  :from: test@example.com
11
18
  :to: ["test@example.com"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ses-proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: