Class: DocuSign_eSign::AuthenticationApi
- Inherits:
-
Object
- Object
- DocuSign_eSign::AuthenticationApi
- Defined in:
- lib/docusign_esign/api/authentication_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_social_login(account_id, user_id, social_account_information) ⇒ nil
Deletes user’s social account.
-
#delete_social_login_with_http_info(account_id, user_id, social_account_information) ⇒ Array<(nil, Fixnum, Hash)>
Deletes user's social account.
-
#get_o_auth_token ⇒ OauthAccess
Creates an authorization token.
-
#get_o_auth_token_with_http_info ⇒ Array<(OauthAccess, Fixnum, Hash)>
Creates an authorization token.
-
#initialize(api_client = AuthenticationApi.default) ⇒ AuthenticationApi
constructor
A new instance of AuthenticationApi.
-
#list_social_logins(account_id, user_id) ⇒ UserSocialIdResult
Gets a list of a user’s social accounts.
-
#list_social_logins_with_http_info(account_id, user_id) ⇒ Array<(UserSocialIdResult, Fixnum, Hash)>
Gets a list of a user's social accounts.
-
#login(options = DocuSign_eSign::LoginOptions.default) ⇒ LoginInformation
Gets login information for a specified user.
-
#login_with_http_info(options = DocuSign_eSign::LoginOptions.default) ⇒ Array<(LoginInformation, Fixnum, Hash)>
Gets login information for a specified user.
-
#revoke_o_auth_token ⇒ nil
Revokes an authorization token.
-
#revoke_o_auth_token_with_http_info ⇒ Array<(nil, Fixnum, Hash)>
Revokes an authorization token.
-
#update_password(login_part, user_password_information) ⇒ nil
Updates the password for a specified user.
-
#update_password_with_http_info(login_part, user_password_information) ⇒ Array<(nil, Fixnum, Hash)>
Updates the password for a specified user.
-
#update_social_login(account_id, user_id, social_account_information) ⇒ nil
Adds social account for a user.
-
#update_social_login_with_http_info(account_id, user_id, social_account_information) ⇒ Array<(nil, Fixnum, Hash)>
Adds social account for a user.
Constructor Details
#initialize(api_client = AuthenticationApi.default) ⇒ AuthenticationApi
Returns a new instance of AuthenticationApi.
38 39 40 |
# File 'lib/docusign_esign/api/authentication_api.rb', line 38 def initialize(api_client = AuthenticationApi.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
36 37 38 |
# File 'lib/docusign_esign/api/authentication_api.rb', line 36 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.
48 49 50 51 |
# File 'lib/docusign_esign/api/authentication_api.rb', line 48 def (account_id, user_id, ) (account_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's social account. Deletes a social account from a use's account.
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 89 90 91 92 93 94 |
# File 'lib/docusign_esign/api/authentication_api.rb', line 59 def (account_id, 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 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() 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 ⇒ OauthAccess
Creates an authorization token. Creates an OAuth2 authorization server token endpoint.
99 100 101 102 |
# 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 ⇒ Array<(OauthAccess, Fixnum, Hash)>
Creates an authorization token. Creates an OAuth2 authorization server token endpoint.
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 |
# 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) ⇒ UserSocialIdResult
Gets a list of a user’s social accounts. Retrieves a list of social accounts linked to a user’s account.
146 147 148 149 |
# File 'lib/docusign_esign/api/authentication_api.rb', line 146 def (account_id, user_id) data, _status_code, _headers = (account_id, 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's social accounts. Retrieves a list of social accounts linked to a user's account.
156 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 |
# File 'lib/docusign_esign/api/authentication_api.rb', line 156 def (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) ⇒ 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.
198 199 200 201 |
# File 'lib/docusign_esign/api/authentication_api.rb', line 198 def login( = DocuSign_eSign::LoginOptions.default) data, _status_code, _headers = login_with_http_info() 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 `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.
207 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 |
# File 'lib/docusign_esign/api/authentication_api.rb', line 207 def login_with_http_info( = 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'] = .api_password if !.api_password.nil? query_params[:'embed_account_id_guid'] = . if !..nil? query_params[:'include_account_id_guid'] = .include_account_id_guid if !.include_account_id_guid.nil? query_params[:'login_settings'] = .login_settings if !.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 ⇒ nil
Revokes an authorization token. Revokes an OAuth2 authorization server token. After the revocation is complete, a caller must re-authenticate to restore access.
248 249 250 251 |
# 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 ⇒ Array<(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.
256 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 |
# 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) ⇒ nil
Updates the password for a specified user. Updates the password for a specified user.
294 295 296 297 |
# 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) ⇒ Array<(nil, Fixnum, Hash)>
Updates the password for a specified user. Updates the password for a specified user.
304 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 |
# 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) ⇒ nil
Adds social account for a user. Adds a new social account to a user’s account.
345 346 347 348 |
# File 'lib/docusign_esign/api/authentication_api.rb', line 345 def (account_id, user_id, ) (account_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's account.
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 387 388 389 390 391 |
# File 'lib/docusign_esign/api/authentication_api.rb', line 356 def (account_id, 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 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() 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 |