Class: DependencyTracker::UserApi
- Inherits:
-
Object
- Object
- DependencyTracker::UserApi
- Defined in:
- lib/dependency-tracker-client/api/user_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_team_to_user(username, body, opts = {}) ⇒ UserPrincipal
Adds the username to the specified team.
-
#add_team_to_user_with_http_info(username, body, opts = {}) ⇒ Array<(UserPrincipal, Integer, Hash)>
Adds the username to the specified team.
-
#create_ldap_user(opts = {}) ⇒ LdapUser
Creates a new user that references an existing LDAP object.
-
#create_ldap_user_with_http_info(opts = {}) ⇒ Array<(LdapUser, Integer, Hash)>
Creates a new user that references an existing LDAP object.
-
#create_managed_user(opts = {}) ⇒ ManagedUser
Creates a new user.
-
#create_managed_user_with_http_info(opts = {}) ⇒ Array<(ManagedUser, Integer, Hash)>
Creates a new user.
-
#delete_ldap_user(opts = {}) ⇒ nil
Deletes a user.
-
#delete_ldap_user_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Deletes a user.
-
#delete_managed_user(opts = {}) ⇒ nil
Deletes a user.
-
#delete_managed_user_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Deletes a user.
-
#force_change_password(opts = {}) ⇒ String
Asserts login credentials and upon successful authentication, verifies passwords match and changes users password Upon a successful login, a JSON Web Token will be returned in the response body.
-
#force_change_password_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Asserts login credentials and upon successful authentication, verifies passwords match and changes users password Upon a successful login, a JSON Web Token will be returned in the response body.
-
#get_ldap_users(opts = {}) ⇒ Array<LdapUser>
Returns a list of all LDAP users.
-
#get_ldap_users_with_http_info(opts = {}) ⇒ Array<(Array<LdapUser>, Integer, Hash)>
Returns a list of all LDAP users.
-
#get_managed_users(opts = {}) ⇒ Array<ManagedUser>
Returns a list of all managed users.
-
#get_managed_users_with_http_info(opts = {}) ⇒ Array<(Array<ManagedUser>, Integer, Hash)>
Returns a list of all managed users.
-
#get_self(opts = {}) ⇒ UserPrincipal
Returns information about the current logged in user.
-
#get_self_with_http_info(opts = {}) ⇒ Array<(UserPrincipal, Integer, Hash)>
Returns information about the current logged in user.
-
#initialize(api_client = ApiClient.default) ⇒ UserApi
constructor
A new instance of UserApi.
-
#remove_team_from_user(username, body, opts = {}) ⇒ UserPrincipal
Removes the username from the specified team.
-
#remove_team_from_user_with_http_info(username, body, opts = {}) ⇒ Array<(UserPrincipal, Integer, Hash)>
Removes the username from the specified team.
-
#update_managed_user(opts = {}) ⇒ ManagedUser
Updates a managed user.
-
#update_managed_user_with_http_info(opts = {}) ⇒ Array<(ManagedUser, Integer, Hash)>
Updates a managed user.
-
#update_self(opts = {}) ⇒ UserPrincipal
Updates information about the current logged in user.
-
#update_self_with_http_info(opts = {}) ⇒ Array<(UserPrincipal, Integer, Hash)>
Updates information about the current logged in user.
-
#validate_credentials(opts = {}) ⇒ String
Assert login credentials Upon a successful login, a JSON Web Token will be returned in the response body.
-
#validate_credentials_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Assert login credentials Upon a successful login, a JSON Web Token will be returned in the response body.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ UserApi
Returns a new instance of UserApi.
19 20 21 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_team_to_user(username, body, opts = {}) ⇒ UserPrincipal
Adds the username to the specified team.
27 28 29 30 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 27 def add_team_to_user(username, body, opts = {}) data, _status_code, _headers = add_team_to_user_with_http_info(username, body, opts) data end |
#add_team_to_user_with_http_info(username, body, opts = {}) ⇒ Array<(UserPrincipal, Integer, Hash)>
Adds the username to the specified team.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 37 def add_team_to_user_with_http_info(username, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.add_team_to_user ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.add_team_to_user" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling UserApi.add_team_to_user" end # resource path local_var_path = '/v1/user/{username}/membership'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'UserPrincipal' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#add_team_to_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_ldap_user(opts = {}) ⇒ LdapUser
Creates a new user that references an existing LDAP object.
94 95 96 97 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 94 def create_ldap_user(opts = {}) data, _status_code, _headers = create_ldap_user_with_http_info(opts) data end |
#create_ldap_user_with_http_info(opts = {}) ⇒ Array<(LdapUser, Integer, Hash)>
Creates a new user that references an existing LDAP object.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 103 def create_ldap_user_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.create_ldap_user ...' end # resource path local_var_path = '/v1/user/ldap' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'LdapUser' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#create_ldap_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_managed_user(opts = {}) ⇒ ManagedUser
Creates a new user.
152 153 154 155 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 152 def create_managed_user(opts = {}) data, _status_code, _headers = create_managed_user_with_http_info(opts) data end |
#create_managed_user_with_http_info(opts = {}) ⇒ Array<(ManagedUser, Integer, Hash)>
Creates a new user.
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 161 def create_managed_user_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.create_managed_user ...' end # resource path local_var_path = '/v1/user/managed' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'ManagedUser' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#create_managed_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_ldap_user(opts = {}) ⇒ nil
Deletes a user.
210 211 212 213 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 210 def delete_ldap_user(opts = {}) delete_ldap_user_with_http_info(opts) nil end |
#delete_ldap_user_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Deletes a user.
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 219 def delete_ldap_user_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.delete_ldap_user ...' end # resource path local_var_path = '/v1/user/ldap' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#delete_ldap_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_managed_user(opts = {}) ⇒ nil
Deletes a user.
266 267 268 269 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 266 def delete_managed_user(opts = {}) delete_managed_user_with_http_info(opts) nil end |
#delete_managed_user_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Deletes a user.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 275 def delete_managed_user_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.delete_managed_user ...' end # resource path local_var_path = '/v1/user/managed' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#delete_managed_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#force_change_password(opts = {}) ⇒ String
Asserts login credentials and upon successful authentication, verifies passwords match and changes users password Upon a successful login, a JSON Web Token will be returned in the response body. This functionality requires authentication to be enabled.
326 327 328 329 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 326 def force_change_password(opts = {}) data, _status_code, _headers = force_change_password_with_http_info(opts) data end |
#force_change_password_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Asserts login credentials and upon successful authentication, verifies passwords match and changes users password Upon a successful login, a JSON Web Token will be returned in the response body. This functionality requires authentication to be enabled.
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 339 def force_change_password_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.force_change_password ...' end # resource path local_var_path = '/v1/user/forceChangePassword' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} form_params['username'] = opts[:'username'] if !opts[:'username'].nil? form_params['password'] = opts[:'password'] if !opts[:'password'].nil? form_params['newPassword'] = opts[:'new_password'] if !opts[:'new_password'].nil? form_params['confirmPassword'] = opts[:'confirm_password'] if !opts[:'confirm_password'].nil? # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'String' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#force_change_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ldap_users(opts = {}) ⇒ Array<LdapUser>
Returns a list of all LDAP users
391 392 393 394 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 391 def get_ldap_users(opts = {}) data, _status_code, _headers = get_ldap_users_with_http_info(opts) data end |
#get_ldap_users_with_http_info(opts = {}) ⇒ Array<(Array<LdapUser>, Integer, Hash)>
Returns a list of all LDAP users
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 399 def get_ldap_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.get_ldap_users ...' end # resource path local_var_path = '/v1/user/ldap' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<LdapUser>' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#get_ldap_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_managed_users(opts = {}) ⇒ Array<ManagedUser>
Returns a list of all managed users
445 446 447 448 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 445 def get_managed_users(opts = {}) data, _status_code, _headers = get_managed_users_with_http_info(opts) data end |
#get_managed_users_with_http_info(opts = {}) ⇒ Array<(Array<ManagedUser>, Integer, Hash)>
Returns a list of all managed users
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 453 def get_managed_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.get_managed_users ...' end # resource path local_var_path = '/v1/user/managed' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<ManagedUser>' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#get_managed_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_self(opts = {}) ⇒ UserPrincipal
Returns information about the current logged in user.
499 500 501 502 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 499 def get_self(opts = {}) data, _status_code, _headers = get_self_with_http_info(opts) data end |
#get_self_with_http_info(opts = {}) ⇒ Array<(UserPrincipal, Integer, Hash)>
Returns information about the current logged in user.
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 507 def get_self_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.get_self ...' end # resource path local_var_path = '/v1/user/self' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'UserPrincipal' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#get_self\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#remove_team_from_user(username, body, opts = {}) ⇒ UserPrincipal
Removes the username from the specified team.
555 556 557 558 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 555 def remove_team_from_user(username, body, opts = {}) data, _status_code, _headers = remove_team_from_user_with_http_info(username, body, opts) data end |
#remove_team_from_user_with_http_info(username, body, opts = {}) ⇒ Array<(UserPrincipal, Integer, Hash)>
Removes the username from the specified team.
565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 565 def remove_team_from_user_with_http_info(username, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.remove_team_from_user ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.remove_team_from_user" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling UserApi.remove_team_from_user" end # resource path local_var_path = '/v1/user/{username}/membership'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'UserPrincipal' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#remove_team_from_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_managed_user(opts = {}) ⇒ ManagedUser
Updates a managed user.
622 623 624 625 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 622 def update_managed_user(opts = {}) data, _status_code, _headers = update_managed_user_with_http_info(opts) data end |
#update_managed_user_with_http_info(opts = {}) ⇒ Array<(ManagedUser, Integer, Hash)>
Updates a managed user.
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 631 def update_managed_user_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.update_managed_user ...' end # resource path local_var_path = '/v1/user/managed' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'ManagedUser' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#update_managed_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_self(opts = {}) ⇒ UserPrincipal
Updates information about the current logged in user.
680 681 682 683 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 680 def update_self(opts = {}) data, _status_code, _headers = update_self_with_http_info(opts) data end |
#update_self_with_http_info(opts = {}) ⇒ Array<(UserPrincipal, Integer, Hash)>
Updates information about the current logged in user.
689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 689 def update_self_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.update_self ...' end # resource path local_var_path = '/v1/user/self' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'UserPrincipal' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#update_self\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#validate_credentials(opts = {}) ⇒ String
Assert login credentials Upon a successful login, a JSON Web Token will be returned in the response body. This functionality requires authentication to be enabled.
738 739 740 741 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 738 def validate_credentials(opts = {}) data, _status_code, _headers = validate_credentials_with_http_info(opts) data end |
#validate_credentials_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Assert login credentials Upon a successful login, a JSON Web Token will be returned in the response body. This functionality requires authentication to be enabled.
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 |
# File 'lib/dependency-tracker-client/api/user_api.rb', line 749 def validate_credentials_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.validate_credentials ...' end # resource path local_var_path = '/v1/user/login' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} form_params['username'] = opts[:'username'] if !opts[:'username'].nil? form_params['password'] = opts[:'password'] if !opts[:'password'].nil? # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'String' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#validate_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |