DataWeb
Search Results for

    Show / Hide Table of Contents

    Interface ISharedKeyService

    Provides a service to authenticate requests using shared keys.

    Namespace: DataWeb.Authorization
    Assembly: DataWeb.Core.dll
    Syntax
    public interface ISharedKeyService

    Methods

    GetHttpHeaders(Uri, string, string, string)

    Generates a dictionary of HTTP headers for authenticating a request.

    Declaration
    Dictionary<string, string> GetHttpHeaders(Uri url, string appName, string secretKey, string httpMethod)
    Parameters
    Type Name Description
    Uri url
    string appName
    string secretKey
    string httpMethod
    Returns
    Type Description
    Dictionary<string, string>

    GetSignature(string, string)

    Computes the signature of the provided data using the provided secret key.

    Declaration
    string GetSignature(string data, string privateKey)
    Parameters
    Type Name Description
    string data
    string privateKey
    Returns
    Type Description
    string

    GetStamp()

    Retrieves the current Unix timestamp.

    Declaration
    ulong GetStamp()
    Returns
    Type Description
    ulong

    IsValidRequest(string, string, string, ulong, string, string, string, ulong)

    Validates if a request is valid based on the provided parameters.

    Declaration
    bool IsValidRequest(string appName, string secretKey, string requestAppName, ulong requestStamp, string requestSignature, string requestUrl, string requestProtocol, ulong seconds = 300)
    Parameters
    Type Name Description
    string appName
    string secretKey
    string requestAppName
    ulong requestStamp
    string requestSignature
    string requestUrl
    string requestProtocol
    ulong seconds
    Returns
    Type Description
    bool

    ValidateStamp(ulong, ulong)

    Validates if the request timestamp is within the specified time range.

    Declaration
    bool ValidateStamp(ulong requestStamp, ulong seconds)
    Parameters
    Type Name Description
    ulong requestStamp
    ulong seconds
    Returns
    Type Description
    bool
    In this article
    Back to top Generated by DocFX