Class DiscordInteractionAuthService
The service that verifies all interaction request.
Inheritance
System.Object
DiscordInteractionAuthService
Implements
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 SourceDiscordInteractionAuthService(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 SourceVerifySignature(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. |
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. |