Files
Desktop_RCULogAgent/bin/aliyun-log-csharp-sdk-master/SLSSDK/Utilities/RequestSigner.cs
2025-12-11 11:39:02 +08:00

33 lines
1017 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* Copyright (C) Alibaba Cloud Computing
* All rights reserved.
*
* 版权所有 C阿里云计算有限公司
*/
using Aliyun.Api.LOG.Common.Authentication;
using Aliyun.Api.LOG.Common.Communication;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
namespace Aliyun.Api.LOG.Utilities
{
internal class LogRequestSigner : IRequestSigner
{
private readonly String httpResource;
private readonly HttpMethod httpMethod;
public LogRequestSigner(String httpResource, HttpMethod httpMethod)
{
this.httpResource = httpResource;
this.httpMethod = httpMethod;
}
public void Sign(ServiceRequest request, ServiceCredentials credentials)
{
request.Headers.Add(LogConsts.NAME_HEADER_AUTH, LogClientTools.Signature(request.Headers, request.Parameters, this.httpMethod, this.httpResource, credentials.AccessId, credentials.AccessKey));
}
}
}