Amazon.Runtime.Internal.Auth.AWS4Signer.Sign C# (CSharp) Метод

Sign() публичный Метод

Calculates and signs the specified request using the AWS4 signing protocol by using the AWS account credentials given in the method parameters. The resulting signature is added to the request headers as 'Authorization'. Parameters supplied in the request, either in the resource path as a query string or in the Parameters collection must not have been uri encoded. If they have, use the SignRequest method to obtain a signature.
/// If any problems are encountered while signing the request. ///
public Sign ( IRequest request, IClientConfig clientConfig, RequestMetrics metrics, string awsAccessKeyId, string awsSecretAccessKey ) : void
request IRequest /// The request to compute the signature for. Additional headers mandated by the AWS4 protocol /// ('host' and 'x-amz-date') will be added to the request before signing. ///
clientConfig IClientConfig /// Client configuration data encompassing the service call (notably authentication /// region, endpoint and service name). ///
metrics Amazon.Runtime.Internal.Util.RequestMetrics /// Metrics for the request ///
awsAccessKeyId string /// The AWS public key for the account making the service call. ///
awsSecretAccessKey string /// The AWS secret key for the account making the call, in clear text. ///
Результат void
        public override void Sign(IRequest request, 
                                  IClientConfig clientConfig, 
                                  RequestMetrics metrics, 
                                  string awsAccessKeyId, 
                                  string awsSecretAccessKey)
        {
            var signingResult = SignRequest(request, clientConfig, metrics, awsAccessKeyId, awsSecretAccessKey);
            request.Headers[HeaderKeys.AuthorizationHeader] = signingResult.ForAuthorizationHeader;
        }