Search Results for

    Show / Hide Table of Contents

    Class DiscordInteractionAuthService

    The service that verifies all interaction request.

    Inheritance
    System.Object
    DiscordInteractionAuthService
    Implements
    IDiscordInteractionAuthService
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Color_Chan.Discord.Commands.Services.Implementations
    Assembly: Color-Chan.Discord.Commands.dll
    Syntax
    public class DiscordInteractionAuthService : IDiscordInteractionAuthService

    Constructors

    | Improve this Doc View Source

    DiscordInteractionAuthService(DiscordTokens)

    Initializes a new instance of DiscordInteractionAuthService.

    Declaration
    public DiscordInteractionAuthService(DiscordTokens discordTokens)
    Parameters
    Type Name Description
    DiscordTokens discordTokens

    The DiscordTokens containing all the necessary tokens.

    Methods

    | Improve this Doc View Source

    VerifySignature(String, String, String)

    Verifies an interaction request.

    Declaration
    public bool VerifySignature(string signature, string timestamp, string rawBody)
    Parameters
    Type Name Description
    System.String signature

    The signature send with the request.

    System.String timestamp

    The signature time stamp send with the request.

    System.String rawBody

    The body of the request.

    Returns
    Type Description
    System.Boolean

    Whether or not the request has been successfully verified.

    | Improve this Doc View Source

    VerifySignatureAsync(String, String, Stream)

    Verifies an interaction request asynchronously.

    Declaration
    public async Task<bool> VerifySignatureAsync(string signature, string timestamp, Stream bodyStream)
    Parameters
    Type Name Description
    System.String signature

    The signature send with the request.

    System.String timestamp

    The signature time stamp send with the request.

    System.IO.Stream bodyStream
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    Whether or not the request has been successfully verified.

    Implements

    IDiscordInteractionAuthService
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX