Table of Contents

Class TokenClient

Namespace
GuildWars2.Authorization
Assembly
GW2SDK.dll

Provides query methods for access token introspection and subtoken creation.

public sealed class TokenClient
Inheritance
TokenClient
Inherited Members

Constructors

TokenClient(HttpClient)

Initializes a new instance of the TokenClient class.

Methods

CreateSubtoken(string, IEnumerable<Permission>?, DateTimeOffset?, IEnumerable<string>?, MissingMemberBehavior, CancellationToken)

Creates a new access token with the specified permissions, expiration and URL restrictions. If the parent token is an API key, the subtoken will inherit the permissions of the API key. The subtoken will always have an expiration date and optionally more restricted permissions. If the parent token is also a subtoken, the new subtoken will inherit the restrictions of the old subtoken.

CreateSubtoken(string, IEnumerable<Permission>?, DateTimeOffset?, IEnumerable<Uri>?, MissingMemberBehavior, CancellationToken)

Creates a new access token with the specified permissions, expiration and URL restrictions. If the parent token is an API key, the subtoken will inherit the permissions of the API key. The subtoken will always have an expiration date and optionally more restricted permissions. If the parent token is also a subtoken, the new subtoken will inherit the restrictions of the old subtoken.

GetTokenInfo(string, MissingMemberBehavior, CancellationToken)

Retrieves information about the current access token.