Class TokenUtils
Provides a series of helper methods for handling Discord login tokens.
Inheritance
System.Object
TokenUtils
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public static class TokenUtils
Methods
| Improve this Doc View SourceValidateToken(TokenType, String)
Checks the validity of the supplied token of a specific type.
Declaration
public static void ValidateToken(TokenType tokenType, string token)
Parameters
| Type | Name | Description |
|---|---|---|
| TokenType | tokenType | The type of token to validate. |
| System.String | token | The token value to validate. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when the supplied token string is |
| System.ArgumentException | Thrown when the supplied TokenType or token value is invalid. |