class DocuSign_eSign::AuthenticationApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = AuthenticationApi.default) click to toggle source
# File lib/docusign_esign/api/authentication_api.rb, line 38
def initialize(api_client = AuthenticationApi.default)
  @api_client = api_client
end

Public Instance Methods

delete_social_login(account_id, user_id, social_account_information) click to toggle source

Deletes user’s social account. Deletes a social account from a use’s account. @param account_id The external account number (int) or account ID Guid. @param 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. @param social_account_information (optional parameter) @return [nil]

# File lib/docusign_esign/api/authentication_api.rb, line 48
def delete_social_login(account_id, user_id, social_account_information)
  delete_social_login_with_http_info(account_id, user_id,  social_account_information)
  return nil
end
delete_social_login_with_http_info(account_id, user_id, social_account_information) click to toggle source

Deletes user&#39;s social account. Deletes a social account from a use&#39;s account. @param account_id The external account number (int) or account ID Guid. @param 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. @param social_account_information (optional parameter) @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/docusign_esign/api/authentication_api.rb, line 59
def delete_social_login_with_http_info(account_id, user_id, social_account_information)
  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 account_id.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' + '}', account_id.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(social_account_information)
  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_token() click to toggle source

Creates an authorization token. Creates an OAuth2 authorization server token endpoint. @return [OauthAccess]

# File lib/docusign_esign/api/authentication_api.rb, line 99
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_info() click to toggle source

Creates an authorization token. Creates an OAuth2 authorization server token endpoint. @return [Array<(OauthAccess, Fixnum, Hash)>] OauthAccess data, response status code and response headers

# File lib/docusign_esign/api/authentication_api.rb, line 107
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) click to toggle source

Gets a list of a user’s social accounts. Retrieves a list of social accounts linked to a user’s account. @param account_id The external account number (int) or account ID Guid. @param 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. @return [UserSocialIdResult]

# File lib/docusign_esign/api/authentication_api.rb, line 146
def list_social_logins(account_id, user_id)
  data, _status_code, _headers = list_social_logins_with_http_info(account_id, user_id)
  return data
end
list_social_logins_with_http_info(account_id, user_id) click to toggle source

Gets a list of a user&#39;s social accounts. Retrieves a list of social accounts linked to a user&#39;s account. @param account_id The external account number (int) or account ID Guid. @param 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. @return [Array<(UserSocialIdResult, Fixnum, Hash)>] UserSocialIdResult data, response status code and response headers

# File lib/docusign_esign/api/authentication_api.rb, line 156
def list_social_logins_with_http_info(account_id, 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 account_id.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' + '}', account_id.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) click to toggle source

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. @param DocuSign_eSign::LoginOptions Options for modifying the behavior of the function. @return [LoginInformation]

# File lib/docusign_esign/api/authentication_api.rb, line 198
def login(options = DocuSign_eSign::LoginOptions.default)
  data, _status_code, _headers = login_with_http_info(options)
  return data
end
login_with_http_info(options = DocuSign_eSign::LoginOptions.default) click to toggle source

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. @param DocuSign_eSign::LoginOptions Options for modifying the behavior of the function. @return [Array<(LoginInformation, Fixnum, Hash)>] LoginInformation data, response status code and response headers

# File lib/docusign_esign/api/authentication_api.rb, line 207
def login_with_http_info(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.embed_account_id_guid if !options.embed_account_id_guid.nil?
  query_params[:'include_account_id_guid'] = options.include_account_id_guid if !options.include_account_id_guid.nil?
  query_params[:'login_settings'] = options.login_settings if !options.login_settings.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_token() click to toggle source

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

# File lib/docusign_esign/api/authentication_api.rb, line 248
def revoke_o_auth_token()
  revoke_o_auth_token_with_http_info()
  return nil
end
revoke_o_auth_token_with_http_info() click to toggle source

Revokes an authorization token. Revokes an OAuth2 authorization server token. After the revocation is complete, a caller must re-authenticate to restore access. @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/docusign_esign/api/authentication_api.rb, line 256
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) click to toggle source

Updates the password for a specified user. Updates the password for a specified user. @param login_part Currently, only the value password is supported. @param user_password_information (optional parameter) @return [nil]

# File lib/docusign_esign/api/authentication_api.rb, line 294
def update_password(login_part, user_password_information)
  update_password_with_http_info(login_part,  user_password_information)
  return nil
end
update_password_with_http_info(login_part, user_password_information) click to toggle source

Updates the password for a specified user. Updates the password for a specified user. @param login_part Currently, only the value password is supported. @param user_password_information (optional parameter) @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/docusign_esign/api/authentication_api.rb, line 304
def update_password_with_http_info(login_part, 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 login_part.nil?
  # resource path
  local_var_path = "/v2.1/login_information/{loginPart}".sub('{format}','json').sub('{' + 'loginPart' + '}', login_part.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) click to toggle source

Adds social account for a user. Adds a new social account to a user’s account. @param account_id The external account number (int) or account ID Guid. @param 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. @param social_account_information (optional parameter) @return [nil]

# File lib/docusign_esign/api/authentication_api.rb, line 345
def update_social_login(account_id, user_id, social_account_information)
  update_social_login_with_http_info(account_id, user_id,  social_account_information)
  return nil
end
update_social_login_with_http_info(account_id, user_id, social_account_information) click to toggle source

Adds social account for a user. Adds a new social account to a user&#39;s account. @param account_id The external account number (int) or account ID Guid. @param 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. @param social_account_information (optional parameter) @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/docusign_esign/api/authentication_api.rb, line 356
def update_social_login_with_http_info(account_id, user_id, social_account_information)
  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 account_id.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' + '}', account_id.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(social_account_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_social_login\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end