NetFramework-SC.Data.Rest
0.0.8
dotnet add package NetFramework-SC.Data.Rest --version 0.0.8
NuGet\Install-Package NetFramework-SC.Data.Rest -Version 0.0.8
<PackageReference Include="NetFramework-SC.Data.Rest" Version="0.0.8" />
paket add NetFramework-SC.Data.Rest --version 0.0.8
#r "nuget: NetFramework-SC.Data.Rest, 0.0.8"
// Install NetFramework-SC.Data.Rest as a Cake Addin #addin nuget:?package=NetFramework-SC.Data.Rest&version=0.0.8 // Install NetFramework-SC.Data.Rest as a Cake Tool #tool nuget:?package=NetFramework-SC.Data.Rest&version=0.0.8
NetFramework-SC.Data.Rest
<table> <tbody> <tr> <td><a href="#hmacauthenticator">HMACAuthenticator</a></td> <td><a href="#jsonnetserializer">JsonNetSerializer</a></td> </tr> <tr> <td><a href="#utils">Utils</a></td> </tr> </tbody> </table>
HMACAuthenticator
HMAC implementation of Restsharp IAuthenticator.
Constructor
Default constructor. For deserialization.
Constructor(appName, secret)
Contructor initialization using appName and secret.
Name | Description |
---|---|
appName | System.String<br> |
secret | System.String<br> |
AppName
Application name.
Authenticate(client, request)
Method implementing point of entry for RestSharp authentication.
Name | Description |
---|---|
client | RestSharp.IRestClient<br> |
request | RestSharp.IRestRequest<br> |
GetAuthHeader(requestContentType, requestBodyMd5, requestUrl, requestTs)
Process information into Authentication header value.
Name | Description |
---|---|
requestContentType | System.String<br> |
requestBodyMd5 | System.String<br> |
requestUrl | System.String<br> |
requestTs | System.DateTime<br> |
Returns
GetCanonicalString(contentType, bodyMd5, url, timestamp)
Builds canonical string used by this IAuthenticator implementation.
Name | Description |
---|---|
contentType | System.String<br>Post/Update content type. Null if transaction is not Post/Update. |
bodyMd5 | System.String<br>MD5 of Post/Update body. Null if transaction is not Post/Update. |
url | System.String<br>Endpoit url without the hostname. |
timestamp | System.DateTime<br>TimeStamp of transaction. |
Returns
Canonical string
GetHeader(appName, hMacSignature)
Concatenates appName an HMACSignature into Authentication header value.
Name | Description |
---|---|
appName | System.String<br>HMC application name. |
hMacSignature | System.String<br>HMAC signature |
Returns
formated header.
GetHMAC(valueBytes)
Calculates HMAC for a bytes array.
Name | Description |
---|---|
valueBytes | System.Byte[]<br>array of bytes to calculate HMAC on. |
Returns
Base64 encoded signature
GetHMAC(value)
Calculates HMAC for a given string value.
Name | Description |
---|---|
value | System.String<br>string value to calculate HMAC on. |
Returns
GetMd5(md5Hash, input)
Return MD5 has for a given string.
Name | Description |
---|---|
md5Hash | System.Security.Cryptography.MD5<br> |
input | System.String<br> |
Returns
Logger
Local log4net logger.
Secret
Application secret.
JsonNetSerializer
Special Circumstances ISerializer to be used during RestSharp request/response for serializing object into Json.
_ContentType
Setting serialization content type to Json.
RestSharp#Serializers#ISerializer#DateFormat
Not implemented.
RestSharp#Serializers#ISerializer#Namespace
Not implemented.
RestSharp#Serializers#ISerializer#RootElement
Not implemented.
RestSharp#Serializers#ISerializer#Serialize(obj)
Json Serialize object.
Name | Description |
---|---|
obj | System.Object<br> |
Returns
Json serialization
Utils
Special Circumstances Restsharp utilities.
NewRequest(client, resource, method)
Default Restsharp request.
Name | Description |
---|---|
client | RestSharp.RestClient<br> |
resource | System.String<br>Referencial uri resource. |
method | RestSharp.Method<br>HTTP method. |
Returns
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- NetFramework-SC.Data (>= 0.0.8)
- RestSharp (>= 106.3.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NetFramework-SC.Data.Rest:
Package | Downloads |
---|---|
NetFramework-SC.Elastic
AWS functionality for Special Circumstances play ground. |
GitHub repositories
This package is not used by any popular GitHub repositories.
First test package.