Class: DocuSign_eSign::AuthenticationApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_esign/api/authentication_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = AuthenticationApi.default) ⇒ AuthenticationApi

Returns a new instance of AuthenticationApi.


39
40
41
# File 'lib/docusign_esign/api/authentication_api.rb', line 39

def initialize(api_client = AuthenticationApi.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client


37
38
39
# File 'lib/docusign_esign/api/authentication_api.rb', line 37

def api_client
  @api_client
end

Instance Method Details

#delete_social_login(account_id, user_id, social_account_information) ⇒ nil

Deletes user's social account. Deletes a social account from a use's account.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • user_id

    The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing.

  • social_account_information (optional parameter)

Returns:

  • (nil)

49
50
51
52
# File 'lib/docusign_esign/api/authentication_api.rb', line 49

def (, user_id, )
  (, user_id,  )
  return nil
end

#delete_social_login_with_http_info(account_id, user_id, social_account_information) ⇒ Array<(nil, Fixnum, Hash)>

Deletes user&#39;s social account. Deletes a social account from a use&#39;s account.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • user_id

    The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing.

  • social_account_information (optional parameter)

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers


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
89
90
91
92
93
94
95
# File 'lib/docusign_esign/api/authentication_api.rb', line 60

def (, user_id, )
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuthenticationApi.delete_social_login ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling AuthenticationApi.delete_social_login" if .nil?
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling AuthenticationApi.delete_social_login" if user_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/users/{userId}/social".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body()
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#delete_social_login\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_o_auth_tokenOauthAccess

Creates an authorization token. Creates an OAuth2 authorization server token endpoint.

Returns:


100
101
102
103
# File 'lib/docusign_esign/api/authentication_api.rb', line 100

def get_o_auth_token()
  data, _status_code, _headers = get_o_auth_token_with_http_info()
  return data
end

#get_o_auth_token_with_http_infoArray<(OauthAccess, Fixnum, Hash)>

Creates an authorization token. Creates an OAuth2 authorization server token endpoint.

Returns:

  • (Array<(OauthAccess, Fixnum, Hash)>)

    OauthAccess data, response status code and response headers


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
# File 'lib/docusign_esign/api/authentication_api.rb', line 108

def get_o_auth_token_with_http_info()
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuthenticationApi.get_o_auth_token ..."
  end
  # resource path
  local_var_path = "/v2.1/oauth2/token".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OauthAccess')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#get_o_auth_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_social_logins(account_id, user_id) ⇒ UserSocialIdResult

Gets a list of a user's social accounts. Retrieves a list of social accounts linked to a user's account.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • user_id

    The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing.

Returns:


147
148
149
150
# File 'lib/docusign_esign/api/authentication_api.rb', line 147

def list_social_logins(, user_id)
  data, _status_code, _headers = list_social_logins_with_http_info(, user_id)
  return data
end

#list_social_logins_with_http_info(account_id, user_id) ⇒ Array<(UserSocialIdResult, Fixnum, Hash)>

Gets a list of a user&#39;s social accounts. Retrieves a list of social accounts linked to a user&#39;s account.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • user_id

    The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing.

Returns:

  • (Array<(UserSocialIdResult, Fixnum, Hash)>)

    UserSocialIdResult data, response status code and response headers


157
158
159
160
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
# File 'lib/docusign_esign/api/authentication_api.rb', line 157

def list_social_logins_with_http_info(, user_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuthenticationApi.list_social_logins ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling AuthenticationApi.list_social_logins" if .nil?
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling AuthenticationApi.list_social_logins" if user_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/users/{userId}/social".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UserSocialIdResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#list_social_logins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#login(options = DocuSign_eSign::LoginOptions.default) ⇒ LoginInformation

Gets login information for a specified user. Retrieves login information for a specified user. Each account that is associated with the login credentials is listed. You can use the returned information to determine whether a user is authenticated and select an account to use in future operations. The `baseUrl` property, returned in the response, is used in all future API calls as the base of the request URL. The `baseUrl` property contains the DocuSign server, the API version, and the `accountId` property that is used for the login. This request uses your DocuSign credentials to retrieve the account information.

Parameters:

  • DocuSign_eSign::LoginOptions

    Options for modifying the behavior of the function.

Returns:


199
200
201
202
# File 'lib/docusign_esign/api/authentication_api.rb', line 199

def (options = DocuSign_eSign::LoginOptions.default)
  data, _status_code, _headers = (options)
  return data
end

#login_with_http_info(options = DocuSign_eSign::LoginOptions.default) ⇒ Array<(LoginInformation, Fixnum, Hash)>

Gets login information for a specified user. Retrieves login information for a specified user. Each account that is associated with the login credentials is listed. You can use the returned information to determine whether a user is authenticated and select an account to use in future operations. The &#x60;baseUrl&#x60; property, returned in the response, is used in all future API calls as the base of the request URL. The &#x60;baseUrl&#x60; property contains the DocuSign server, the API version, and the &#x60;accountId&#x60; property that is used for the login. This request uses your DocuSign credentials to retrieve the account information.

Parameters:

  • DocuSign_eSign::LoginOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(LoginInformation, Fixnum, Hash)>)

    LoginInformation data, response status code and response headers


208
209
210
211
212
213
214
215
216
217
218
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
# File 'lib/docusign_esign/api/authentication_api.rb', line 208

def (options = DocuSign_eSign::LoginOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuthenticationApi.login ..."
  end
  # resource path
  local_var_path = "/v2.1/login_information".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'api_password'] = options.api_password if !options.api_password.nil?
  query_params[:'embed_account_id_guid'] = options. if !options..nil?
  query_params[:'include_account_id_guid'] = options. if !options..nil?
  query_params[:'login_settings'] = options. if !options..nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LoginInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#login\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#revoke_o_auth_tokennil

Revokes an authorization token. Revokes an OAuth2 authorization server token. After the revocation is complete, a caller must re-authenticate to restore access.

Returns:

  • (nil)

249
250
251
252
# File 'lib/docusign_esign/api/authentication_api.rb', line 249

def revoke_o_auth_token()
  revoke_o_auth_token_with_http_info()
  return nil
end

#revoke_o_auth_token_with_http_infoArray<(nil, Fixnum, Hash)>

Revokes an authorization token. Revokes an OAuth2 authorization server token. After the revocation is complete, a caller must re-authenticate to restore access.

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers


257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# File 'lib/docusign_esign/api/authentication_api.rb', line 257

def revoke_o_auth_token_with_http_info()
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuthenticationApi.revoke_o_auth_token ..."
  end
  # resource path
  local_var_path = "/v2.1/oauth2/revoke".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#revoke_o_auth_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_password(login_part, user_password_information) ⇒ nil

Updates the password for a specified user. Updates the password for a specified user.

Parameters:

  • login_part

    Currently, only the value *password* is supported.

  • user_password_information (optional parameter)

Returns:

  • (nil)

295
296
297
298
# File 'lib/docusign_esign/api/authentication_api.rb', line 295

def update_password(, user_password_information)
  update_password_with_http_info(,  user_password_information)
  return nil
end

#update_password_with_http_info(login_part, user_password_information) ⇒ Array<(nil, Fixnum, Hash)>

Updates the password for a specified user. Updates the password for a specified user.

Parameters:

  • login_part

    Currently, only the value *password* is supported.

  • user_password_information (optional parameter)

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers


305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
# File 'lib/docusign_esign/api/authentication_api.rb', line 305

def update_password_with_http_info(, user_password_information)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuthenticationApi.update_password ..."
  end
  # verify the required parameter 'login_part' is set
  fail ArgumentError, "Missing the required parameter 'login_part' when calling AuthenticationApi.update_password" if .nil?
  # resource path
  local_var_path = "/v2.1/login_information/{loginPart}".sub('{format}','json').sub('{' + 'loginPart' + '}', .to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(user_password_information)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#update_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_social_login(account_id, user_id, social_account_information) ⇒ nil

Adds social account for a user. Adds a new social account to a user's account.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • user_id

    The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing.

  • social_account_information (optional parameter)

Returns:

  • (nil)

346
347
348
349
# File 'lib/docusign_esign/api/authentication_api.rb', line 346

def (, user_id, )
  (, user_id,  )
  return nil
end

#update_social_login_with_http_info(account_id, user_id, social_account_information) ⇒ Array<(nil, Fixnum, Hash)>

Adds social account for a user. Adds a new social account to a user&#39;s account.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • user_id

    The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing.

  • social_account_information (optional parameter)

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers


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
387
388
389
390
391
392
# File 'lib/docusign_esign/api/authentication_api.rb', line 357

def (, user_id, )
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuthenticationApi.update_social_login ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling AuthenticationApi.update_social_login" if .nil?
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling AuthenticationApi.update_social_login" if user_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/users/{userId}/social".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body()
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#update_social_login\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end