Skip to content

Commit

Permalink
Auth failing. Java driver expects a char array.
Browse files Browse the repository at this point in the history
  • Loading branch information
marclove committed Dec 9, 2012
1 parent cdeb6d3 commit 788244d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/jmongo/db.rb
Expand Up @@ -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
Expand All @@ -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)
Expand Down

1 comment on commit 788244d

@guyboertje
Copy link

Choose a reason for hiding this comment

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

I am happy to merge this.

Are you using jmongo in production? I ask because we are thinking of ceasing maintenance of jmongo.

Please sign in to comment.