Table of Contents

Class SessionsClient

Namespace
Auth0.ManagementApi
Assembly
Auth0.ManagementApi.dll
public class SessionsClient : ISessionsClient
Inheritance
SessionsClient
Implements
Inherited Members
Extension Methods

Methods

DeleteAsync(string, RequestOptions?, CancellationToken)

Delete a session by ID.

public Task DeleteAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

id string
options RequestOptions
cancellationToken CancellationToken

Returns

Task

Examples

await client.Sessions.DeleteAsync("id");

GetAsync(string, RequestOptions?, CancellationToken)

Retrieve session information.

public WithRawResponseTask<GetSessionResponseContent> GetAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

id string
options RequestOptions
cancellationToken CancellationToken

Returns

WithRawResponseTask<GetSessionResponseContent>

Examples

await client.Sessions.GetAsync("id");

RevokeAsync(string, RequestOptions?, CancellationToken)

Revokes a session by ID and all associated refresh tokens.

public Task RevokeAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

id string
options RequestOptions
cancellationToken CancellationToken

Returns

Task

Examples

await client.Sessions.RevokeAsync("id");

UpdateAsync(string, UpdateSessionRequestContent, RequestOptions?, CancellationToken)

Update session information.

public WithRawResponseTask<UpdateSessionResponseContent> UpdateAsync(string id, UpdateSessionRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

id string
request UpdateSessionRequestContent
options RequestOptions
cancellationToken CancellationToken

Returns

WithRawResponseTask<UpdateSessionResponseContent>

Examples

await client.Sessions.UpdateAsync("id", new UpdateSessionRequestContent());