Back to Node Auth0

Class SessionsClient

docs/classes/management.SDK.SessionsClient.html

5.9.16.1 KB
Original Source

Class SessionsClient

Index

Constructors

constructor

Methods

getdeleteupdaterevoke

Properties

_options

Constructors

constructor

new SessionsClient(options: BaseClientOptions): SessionsClient

Parameters

Returns SessionsClient

Methods

get

get(
id: string,
requestOptions?: SessionsClient.RequestOptions,
): HttpResponsePromise<GetSessionResponseContent>

Retrieve session information.

Parameters

  • id: string

ID of session to retrieve

Request-specific configuration.

Returns HttpResponsePromise<GetSessionResponseContent>

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.sessions.get("id")Copy

delete

delete(
id: string,
requestOptions?: SessionsClient.RequestOptions,
): HttpResponsePromise<void>

Delete a session by ID.

Parameters

  • id: string

ID of the session to delete.

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.sessions.delete("id")Copy

update

update(
id: string,
request?: UpdateSessionRequestContent,
requestOptions?: SessionsClient.RequestOptions,
): HttpResponsePromise<UpdateSessionResponseContent>

Update session information.

Parameters

  • id: string

ID of the session to update.

Request-specific configuration.

Returns HttpResponsePromise<UpdateSessionResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.sessions.update("id")Copy

revoke

revoke(
id: string,
requestOptions?: SessionsClient.RequestOptions,
): HttpResponsePromise<void>

Revokes a session by ID and all associated refresh tokens.

Parameters

  • id: string

ID of the session to revoke.

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.sessions.revoke("id")Copy

Properties

Protected Readonly_options

_options: NormalizedClientOptionsWithAuth<BaseClientOptions>

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Constructors constructor Methods getdeleteupdaterevoke Properties _options