proof-rails 1.1.0 → 1.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72f782aa4df0bc5f3d58996705e8ba3c2276a592
4
- data.tar.gz: 0ec8f337510ebc81303f505d08a79902683b6c91
3
+ metadata.gz: b258deb5a2e9c78ea8c8831678ae8ffcafd2657a
4
+ data.tar.gz: 4598105d0eb4106d47b2da9227475fa244da1ed2
5
5
  SHA512:
6
- metadata.gz: bec1a5234f7c0a500423b01888830308507b71ce15709a4ca926007b724309d0289ff040bcc359b0d7d8812ff03cf525d2dd4c421f01b08b7bbe286ce10d570c
7
- data.tar.gz: c20c63967c2173bde2c499345fc326049a37ed224f1962fd5318005c1cf0147f3af39a63275bce3fe036858ea56914d52ae9bec3755f7b2cd70e7e91a696ef74
6
+ metadata.gz: 2f44f9ad80c2cf6f43072a7e32b5e34a999d7aadb08715ac9f1aaadccfbdb0760b6d9acb553326b774d98b9842485defcdd1dbcefb863c9307f326fe580e7749
7
+ data.tar.gz: 2c7196386c7bf387423cc2913c430ec3a521abf32a2e7d945746811d46a9571305808288d4360d62d77633d7163a331adca8b3a83e1e8c803d7747f08ad77eff
@@ -21,7 +21,7 @@ module Proof
21
21
  def login
22
22
  proof_class = self.class.proof_options[:authenticatable].to_s.camelize.constantize
23
23
  user = proof_class.find_by(self.class.proof_options[:identifier] => params[:identifier])
24
- if user && user.send(self.class.proof_options[:authenticate], params[:password])
24
+ if user && user.send(self.class.proof_options[:authenticate], params[self.class.proof_options[:password]])
25
25
  render json: { auth_token: Proof::Token.from_data({ user_id: user.id }) }
26
26
  else
27
27
  render json: { error: "Invalid Credentials." }, status: :unauthorized
@@ -1,3 +1,3 @@
1
1
  module Proof
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -2031,3 +2031,73 @@ Processing by AuthenticationController#login as HTML
2031
2031
  User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "fake@email.com"]]
2032
2032
  Completed 401 Unauthorized in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)
2033
2033
   (0.1ms) rollback transaction
2034
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2035
+  (0.1ms) begin transaction
2036
+ ---------------------
2037
+ ProofTest: test_truth
2038
+ ---------------------
2039
+  (0.0ms) rollback transaction
2040
+  (0.1ms) begin transaction
2041
+ --------------------------------------
2042
+ TokenTest: test_create_token_from_data
2043
+ --------------------------------------
2044
+  (0.0ms) rollback transaction
2045
+  (0.0ms) begin transaction
2046
+ -----------------------------------------
2047
+ TokenTest: test_create_token_from_encoded
2048
+ -----------------------------------------
2049
+  (0.0ms) rollback transaction
2050
+  (0.1ms) begin transaction
2051
+ ----------------------------------------------------
2052
+ RequireProofTest: test_request_authorized_with_token
2053
+ ----------------------------------------------------
2054
+  (0.1ms) SAVEPOINT active_record_1
2055
+ SQL (0.4ms) INSERT INTO "users" ("email", "password_digest", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "real@email.com"], ["password_digest", "$2a$04$1Krsd6ypfTj9yNackXsY7uJMS2ppQsswAPsnGu9RXzqYdAJP/zVTu"], ["created_at", "2015-07-22 16:25:38.952313"], ["updated_at", "2015-07-22 16:25:38.952313"]]
2056
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2057
+ Processing by AuthenticationController#test as HTML
2058
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2059
+ Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.1ms)
2060
+  (0.1ms) rollback transaction
2061
+  (0.0ms) begin transaction
2062
+ ---------------------------------------------------------
2063
+ RequireProofTest: test_request_unauthorized_without_token
2064
+ ---------------------------------------------------------
2065
+  (0.0ms) SAVEPOINT active_record_1
2066
+ SQL (0.1ms) INSERT INTO "users" ("email", "password_digest", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "real@email.com"], ["password_digest", "$2a$04$vNCj.XzCsXBcHHLR2bn3nu9snCZATv2OpbeS9aHUHj3tQf2w1fXo."], ["created_at", "2015-07-22 16:25:38.974020"], ["updated_at", "2015-07-22 16:25:38.974020"]]
2067
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2068
+ Processing by AuthenticationController#test as HTML
2069
+ Filter chain halted as :require_proof rendered or redirected
2070
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
2071
+  (0.1ms) rollback transaction
2072
+  (0.1ms) begin transaction
2073
+ ---------------------------------------------------------
2074
+ ProofActionsTest: test_proof_actions_defines_login_method
2075
+ ---------------------------------------------------------
2076
+  (0.0ms) SAVEPOINT active_record_1
2077
+ SQL (0.1ms) INSERT INTO "users" ("email", "password_digest", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "real@email.com"], ["password_digest", "$2a$04$rcRF.HbhavsAh68bm5ITDOB9OOPVfZTnwBqslQcyTinV4Ua5tyaJy"], ["created_at", "2015-07-22 16:25:38.980066"], ["updated_at", "2015-07-22 16:25:38.980066"]]
2078
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2079
+  (0.1ms) rollback transaction
2080
+  (0.0ms) begin transaction
2081
+ -------------------------------------------------------------
2082
+ ProofActionsTest: test_proof_actions_valid_user_returns_token
2083
+ -------------------------------------------------------------
2084
+  (0.1ms) SAVEPOINT active_record_1
2085
+ SQL (0.1ms) INSERT INTO "users" ("email", "password_digest", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "real@email.com"], ["password_digest", "$2a$04$39ytSwf.7Qn2MgvjQNEG1OhmztiOXExtM.QIQFQyiaXOQ5RrEdL7C"], ["created_at", "2015-07-22 16:25:38.984655"], ["updated_at", "2015-07-22 16:25:38.984655"]]
2086
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2087
+ Processing by AuthenticationController#login as HTML
2088
+ Parameters: {"identifier"=>"real@email.com", "password"=>"[FILTERED]"}
2089
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "real@email.com"]]
2090
+ Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.1ms)
2091
+  (0.1ms) rollback transaction
2092
+  (0.0ms) begin transaction
2093
+ ----------------------------------------------------------------------
2094
+ ProofActionsTest: test_proof_actions_invalid_user_returns_unauthorized
2095
+ ----------------------------------------------------------------------
2096
+  (0.0ms) SAVEPOINT active_record_1
2097
+ SQL (0.1ms) INSERT INTO "users" ("email", "password_digest", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "real@email.com"], ["password_digest", "$2a$04$HQggQCjZPogk3GdfFaPZB.uwTnyGmexsiv128/F.j/dqkmfAPt.va"], ["created_at", "2015-07-22 16:25:38.994121"], ["updated_at", "2015-07-22 16:25:38.994121"]]
2098
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2099
+ Processing by AuthenticationController#login as HTML
2100
+ Parameters: {"identifier"=>"fake@email.com", "password"=>"[FILTERED]"}
2101
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "fake@email.com"]]
2102
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
2103
+  (0.1ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proof-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Hobohm