Permalink
Browse files

Merge pull request #5 from marclove/master

Authorization failing. Java driver expects char array for password.
  • Loading branch information...
2 parents cdeb6d3 + 788244d commit 0dcb97925e77674649a64190adac6b706a9ab046 @guyboertje committed Dec 12, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/jmongo/db.rb
View
@@ -47,7 +47,7 @@ def initialize(db_name, connection, options={})
def authenticate(username, password, save_auth=true)
begin
- succeeded = @j_db.authenticate(username, password)
+ succeeded = @j_db.authenticate(username, java.lang.String.new(password).toCharArray)
if save_auth && succeeded
@connection.add_auth(@name, username, password)
end
@@ -58,7 +58,7 @@ def authenticate(username, password, save_auth=true)
end
def add_user(username, password)
- @j_db.add_user(username, password)
+ @j_db.add_user(username, java.lang.String.new(password).toCharArray)
end
def remove_user(username)

0 comments on commit 0dcb979

Please sign in to comment.