Method: Auth0::Api::V2::Users#create_user
- Defined in:
- lib/auth0/api/v2/users.rb
#create_user(connection, options = {}) ⇒ json
Creates a new user according to optional parameters received. The attribute connection is always mandatory but depending on the type of connection you are using there could be others too. For instance, Auth0 DB Connections require email and password.
49 50 51 52 53 54 55 56 |
# File 'lib/auth0/api/v2/users.rb', line 49 def create_user(connection, = {}) if !connection.is_a?(String) || connection.empty? raise Auth0::MissingParameter, 'Must supply a valid connection' end request_params = Hash[.map { |(k, v)| [k.to_sym, v] }] request_params[:connection] = connection post(users_path, request_params) end |