Class: NotificationService::Sms::Alibaba::Authentication

Inherits:
Object
  • Object
show all
Includes:
APIConfig
Defined in:
app/services/notification_service/sms/alibaba/authentication.rb

Instance Method Summary collapse

Methods included from APIConfig

#access_key_secret, #default_params, #endpoint, #http_method, #separator, #sort_params

Instance Method Details

#authenticate(params) ⇒ String

Authenticates the given parameters by computing the signature.

reference: www.alibabacloud.com/help/en/sms/signature-method

Parameters:

  • params (Hash)

    The parameters to be authenticated.

Returns:

  • (String)

    The computed signature.



13
14
15
16
17
# File 'app/services/notification_service/sms/alibaba/authentication.rb', line 13

def authenticate(params)
  compute_signature(params)
rescue StandardError => e
  APMErrorHandler.report('Failed to authenticate with Alibaba SMS', error: e)
end