lib/rspeckled/plugins/authentication.rb in rspeckled-0.0.45 vs lib/rspeckled/plugins/authentication.rb in rspeckled-0.0.46

- old
+ new

@@ -94,16 +94,16 @@ else [ { 'iss' => 'rspeckled', 'own' => instance['account_id'] || instance['id'], - 'sub' => instance.class.name, + 'sub' => options[:subject] || instance.class.name, 'aud' => 'rspec', 'exp' => 1.day.from_now.utc.to_i, 'nbf' => 1.day.ago.utc.to_i, 'iat' => Time.now.utc.to_i, 'jti' => SecureRandom.uuid, - 'sid' => instance['account_id'] || instance['id'], + 'sid' => options[:subject_id] || instance['account_id'] || instance['id'], 'rol' => options[:roles] || 'standard', }, { 'typ' => 'JWT', 'cty' => 'application/json-web-token',