class DocuSign_eSign::AuthenticationApi
Attributes
Public Class Methods
# File lib/docusign_esign/api/authentication_api.rb, line 38 def initialize(api_client = AuthenticationApi.default) @api_client = api_client end
Public Instance Methods
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
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
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
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 [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
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
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
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
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