Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

User creation #56

Open
ahamid opened this Issue · 3 comments

1 participant

@ahamid

Is user creation something that would be considered in scope for this library? E.g.:

def self.create_user_doc(username, password, roles = [])
  doc = {
    :name => username,
    :_id => "org.couchdb.user:" + username,
    :type => "user",
    :roles => (roles || [])
  }
  if !password.nil?
    doc[:salt] = UUID.generate
    doc[:password_sha] = Digest::SHA1.hexdigest(password + doc[:salt])
  end
  return doc
end
@ahamid

See pull request: #58

@ahamid

has patch and test, see last comment

@ahamid

comments...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.