(project.authSessions)
Manage the authentication sessions of your projects
Gets all authentication sessions of project
import { IntunedClient } from "@intuned/client";
const intunedClient = new IntunedClient({
apiKey: "<YOUR_API_KEY_HERE>",
workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});
async function run() {
const result = await intunedClient.project.authSessions.all("my-project");
// Handle the result
console.log(result)
}
run();
The standalone function version of this method:
import { IntunedClientCore } from "@intuned/client/core.js";
import { projectAuthSessionsAll } from "@intuned/client/funcs/projectAuthSessionsAll.js";
// Use `IntunedClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const intunedClient = new IntunedClientCore({
apiKey: "<YOUR_API_KEY_HERE>",
workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});
async function run() {
const res = await projectAuthSessionsAll(intunedClient, "my-project");
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
projectName |
string | ✔️ | Your project name. It is the name you provide when creating a project. | [object Object] |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. | |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
|
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.AuthSessionInfo[]>
Error Object | Status Code | Content Type |
---|---|---|
errors.ApiErrorInvalidInput | 400 | application/json |
errors.ApiErrorUnauthorized | 401 | application/json |
errors.SDKError | 4xx-5xx | / |
Gets authentication session of project by ID
import { IntunedClient } from "@intuned/client";
const intunedClient = new IntunedClient({
apiKey: "<YOUR_API_KEY_HERE>",
workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});
async function run() {
const result = await intunedClient.project.authSessions.one("my-project", "<value>");
// Handle the result
console.log(result)
}
run();
The standalone function version of this method:
import { IntunedClientCore } from "@intuned/client/core.js";
import { projectAuthSessionsOne } from "@intuned/client/funcs/projectAuthSessionsOne.js";
// Use `IntunedClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const intunedClient = new IntunedClientCore({
apiKey: "<YOUR_API_KEY_HERE>",
workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});
async function run() {
const res = await projectAuthSessionsOne(intunedClient, "my-project", "<value>");
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
projectName |
string | ✔️ | Your project name. It is the name you provide when creating a project. | [object Object] |
authSessionId |
string | ✔️ | Authentication session ID. You can obtain it from the Auth Sessions tab in your project details. | |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. | |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
|
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.AuthSessionInfo>
Error Object | Status Code | Content Type |
---|---|---|
errors.ApiErrorInvalidInput | 400 | application/json |
errors.ApiErrorUnauthorized | 401 | application/json |
errors.SDKError | 4xx-5xx | / |
Deletes an authentication session by ID.
import { IntunedClient } from "@intuned/client";
const intunedClient = new IntunedClient({
apiKey: "<YOUR_API_KEY_HERE>",
workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});
async function run() {
await intunedClient.project.authSessions.delete("my-project", "<value>");
}
run();
The standalone function version of this method:
import { IntunedClientCore } from "@intuned/client/core.js";
import { projectAuthSessionsDelete } from "@intuned/client/funcs/projectAuthSessionsDelete.js";
// Use `IntunedClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const intunedClient = new IntunedClientCore({
apiKey: "<YOUR_API_KEY_HERE>",
workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});
async function run() {
const res = await projectAuthSessionsDelete(intunedClient, "my-project", "<value>");
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
}
run();
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
projectName |
string | ✔️ | Your project name. It is the name you provide when creating a project. | [object Object] |
authSessionId |
string | ✔️ | Authentication session ID. You can obtain it from the Auth Sessions tab in your project details. | |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. | |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
|
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<void>
Error Object | Status Code | Content Type |
---|---|---|
errors.ApiErrorInvalidInput | 400 | application/json |
errors.ApiErrorUnauthorized | 401 | application/json |
errors.SDKError | 4xx-5xx | / |