{
  "openapi": "3.0.1",
  "info": {
    "title": "Auth Service API",
    "description": "API for accessing and managing user sessions and grants.",
    "version": "v1"
  },
  "paths": {
    "/api/apikey": {
      "post": {
        "tags": [
          "ApiKey"
        ],
        "summary": "Create an API key.",
        "description": "SFID-3108: `request.Scopes` must contain at least one scope. SFID-2831:\r\n`request.Scopes` must be a subset of the target client's own\r\n`AllowedScopes` (the client identified by `request.ClientId` if provided, otherwise the\r\nbearer token's own `client_id` claim - see `clientId` below). This only allows minting\r\nscopes that the resource-owning client is itself configured to hold, regardless of which client is\r\nmaking the request. `request.AdditionalClaims` must not contain any privileged/identity\r\nclaim type (e.g. `role`, `scope`, `sub`, `tenant`, `acct`,\r\n`ShareFileTenantRID`). Both checks are unconditional - there is no administrative bypass -\r\nand apply regardless of the caller's own privileges. Missing scopes, disallowed scopes, and unknown\r\nclients return 400 Bad Request; unlicensed callers and privileged claim types return 403 Forbidden.",
        "operationId": "CreateApiKey",
        "requestBody": {
          "description": "The API key creation request.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          },
          "500": {
            "description": "Internal Server Error."
          },
          "200": {
            "description": "The API key handle.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/apikey/{handle}": {
      "get": {
        "tags": [
          "ApiKey"
        ],
        "summary": "Get an API key by its handle.",
        "operationId": "GetApiKeyByHandle",
        "parameters": [
          {
            "name": "handle",
            "in": "path",
            "description": "The API key handle.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientId",
            "in": "query",
            "description": "The client ID associated with the API key (optional - uses the caller's client ID if omitted).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          },
          "500": {
            "description": "Internal Server Error."
          },
          "200": {
            "description": "API key found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Token"
                }
              }
            }
          },
          "404": {
            "description": "API key not found."
          }
        }
      },
      "delete": {
        "tags": [
          "ApiKey"
        ],
        "summary": "Delete an API key by its handle.",
        "operationId": "DeleteApiKeyByHandle",
        "parameters": [
          {
            "name": "handle",
            "in": "path",
            "description": "The API key handle.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientId",
            "in": "query",
            "description": "The client ID associated with the API key (optional - will use the calling client ID if omitted).\r\nThis only scopes which client's key is targeted within the caller's own account - it does not grant\r\naccess to another account (see the account-ownership authorization check below).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          },
          "500": {
            "description": "Internal Server Error."
          },
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/apikey/info/{subject}": {
      "get": {
        "tags": [
          "ApiKey"
        ],
        "summary": "Get an API key's info by its subject.",
        "operationId": "GetApiKeyInfoBySubject",
        "parameters": [
          {
            "name": "subject",
            "in": "path",
            "description": "The subject claim associated with the API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientId",
            "in": "query",
            "description": "The client ID associated with the API key (optional - will use the calling client ID if omitted).\r\nThis only scopes which client's keys are returned within the caller's own account - it does not\r\ngrant access to another account (see the account-ownership authorization check below).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Invalid subject."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          },
          "500": {
            "description": "Internal Server Error."
          },
          "200": {
            "description": "API key info found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyInfoDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/apikey/id/{id}": {
      "delete": {
        "tags": [
          "ApiKey"
        ],
        "summary": "Delete an API key by its ID.",
        "operationId": "DeleteApiKeyById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The API key ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientId",
            "in": "query",
            "description": "The client ID associated with the API key (optional - will use the calling client ID if omitted).\r\nThis only scopes which client's key is targeted within the caller's own account - it does not grant\r\naccess to another account (see the account-ownership authorization check below).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          },
          "500": {
            "description": "Internal Server Error."
          },
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/pat": {
      "post": {
        "tags": [
          "PersonalAccessToken"
        ],
        "summary": "Create a personal access token.",
        "description": "Non-empty `request.Scopes` must be a subset of the authenticated client's `AllowedScopes`.\r\nScopes with mapped ShareFile role requirements (for example, `scim:all` requires\r\n`AdminSCIM`) may only be requested by callers holding that role. `request.AdditionalClaims`\r\nmust not contain privileged or identity claim types such as `role`, `scope`, `sub`,\r\n`tenant`, `acct`, or `ShareFileTenantRID`, and each claim must have a non-empty type\r\nand non-null value.\r\nAn unknown client, malformed claim, or disallowed scope returns 400 Bad Request; a denied claim or\r\nmissing role returns 403 Forbidden. An omitted or empty scope list retains the existing default\r\nscopes: `openid`, `profile`, `email`, and `sharefile:account`.",
        "operationId": "CreatePersonalAccessToken",
        "requestBody": {
          "description": "The personal access token creation request.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonalAccessTokenRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonalAccessTokenRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonalAccessTokenRequest"
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          },
          "500": {
            "description": "Internal Server Error."
          },
          "200": {
            "description": "The personal access token handle.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "PersonalAccessToken"
        ],
        "summary": "Deletes all personal access tokens for a subject and session.",
        "operationId": "DeletePersonalAccessTokens",
        "parameters": [
          {
            "name": "subjectId",
            "in": "query",
            "description": "The subject ID associated with the personal access tokens.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "query",
            "description": "The session ID associated with the personal access tokens (optional).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          },
          "500": {
            "description": "Internal Server Error."
          },
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/pat/{handle}": {
      "get": {
        "tags": [
          "PersonalAccessToken"
        ],
        "summary": "Get a personal access token.\r\nUses the `nonReservedPatHandle` route constraint to avoid collisions when `pat` is a tenant alias\r\n(e.g. ensure `/api/pat/mfa` is handled by the tenant MFA API rather than this PAT-handle route).",
        "operationId": "GetPersonalAccessToken",
        "parameters": [
          {
            "name": "handle",
            "in": "path",
            "description": "The personal access token handle.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          },
          "500": {
            "description": "Internal Server Error."
          },
          "200": {
            "description": "Personal access token found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Token"
                }
              }
            }
          },
          "404": {
            "description": "Personal access token not found."
          }
        }
      },
      "delete": {
        "tags": [
          "PersonalAccessToken"
        ],
        "summary": "Delete a personal access token.\r\nUses the `nonReservedPatHandle` route constraint to avoid collisions when `pat` is a tenant alias\r\n(e.g. ensure `/api/pat/mfa` is handled by the tenant MFA API rather than this PAT-handle route).",
        "operationId": "DeletePersonalAccessToken",
        "parameters": [
          {
            "name": "handle",
            "in": "path",
            "description": "The personal access token handle.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          },
          "500": {
            "description": "Internal Server Error."
          },
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/users/{userRID}/sessions": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "summary": "Get Auth sessions by user.",
        "parameters": [
          {
            "name": "userRID",
            "in": "path",
            "description": "Url Encoded User RID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sessions Retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponseListItemResponse"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "System Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Sessions"
        ],
        "summary": "Revokes Auth sessions by user.",
        "parameters": [
          {
            "name": "userRID",
            "in": "path",
            "description": "Url Encoded User RID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Operation successful."
          },
          "400": {
            "description": "BadRequest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "System Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/self/sessions": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "summary": "Get Auth sessions for current user.",
        "responses": {
          "200": {
            "description": "Sessions Retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponseListItemResponse"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "System Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Sessions"
        ],
        "summary": "Revokes Auth sessions for current user.",
        "parameters": [
          {
            "name": "excludeCurrent",
            "in": "query",
            "description": "Exclude revoking current user session, based off the SID in the incoming token. Defaults to false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Operation successful."
          },
          "400": {
            "description": "BadRequest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "System Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{userRID}/sessions/{sessionId}": {
      "delete": {
        "tags": [
          "Sessions"
        ],
        "summary": "Revoke user session by session id.",
        "parameters": [
          {
            "name": "userRID",
            "in": "path",
            "description": "Url Encoded User RID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "description": "Session Id (sid claim)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Operation successful."
          },
          "400": {
            "description": "BadRequest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "System Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/self/sessions/{sessionId}": {
      "delete": {
        "tags": [
          "Sessions"
        ],
        "summary": "Revoke current user session by session id.",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "description": "Session Id (sid claim)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Operation successful."
          },
          "400": {
            "description": "BadRequest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "System Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/{tenant}/cache": {
      "delete": {
        "tags": [
          "Tenants"
        ],
        "summary": "Clears any cached information about the tenant.",
        "operationId": "ClearTenantCache",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          },
          "500": {
            "description": "Internal Server Error."
          },
          "204": {
            "description": "No Content"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccessTokenType": {
        "enum": [
          "Jwt",
          "Reference"
        ],
        "type": "string"
      },
      "ApiKeyInfoDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The API key identifier.",
            "nullable": true
          },
          "clientId": {
            "type": "string",
            "description": "The client identifier associated with the API key. This is typically used to identify the application or service that the API key belongs to.",
            "nullable": true
          },
          "accountRID": {
            "type": "string",
            "description": "The account resource identifier (RID) associated with the API key. This is used to identify the account that the API key belongs to.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "A description of the API key. This is typically provided by the user when the API key is created and can be used to help identify the purpose or usage of the API key.",
            "nullable": true
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The scopes associated with the API key. Scopes are used to define the permissions or access rights that the API key has. For example, an API key might have scopes that allow it to read data, write data, or perform administrative actions. The specific scopes and their meanings would depend on the application's authorization model.",
            "nullable": true
          },
          "creationDateUtc": {
            "type": "string",
            "description": "The UTC date and time when the API key was created. This is typically set by the system when the API key is created and can be used for auditing, tracking, or determining the age of the API key.",
            "format": "date-time"
          },
          "expirationDateUtc": {
            "type": "string",
            "description": "The UTC date and time when the API key expires. After this date and time, the API key should no longer be considered valid and should not be accepted for authentication or authorization purposes. This is typically set by the user when the API key is created, but it could also be set or updated by the system. If this value is null, it may indicate that the API key does not expire.",
            "format": "date-time",
            "nullable": true
          },
          "additionalClaims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClaimDto"
            },
            "description": "The additional claims associated with the API key. Claims are used to convey information about the API key or its owner, such as roles, permissions, or other attributes. These claims can be included in the API key's access token and used by the application for authorization or other purposes.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The API key information data transfer object (DTO)."
      },
      "Claim": {
        "type": "object",
        "properties": {
          "issuer": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "originalIssuer": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "readOnly": true
          },
          "subject": {
            "$ref": "#/components/schemas/ClaimsIdentity"
          },
          "type": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "value": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "valueType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ClaimDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The claim type (required).",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "The claim value (required).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a claim included in the API key's access token."
      },
      "ClaimsIdentity": {
        "type": "object",
        "properties": {
          "authenticationType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "isAuthenticated": {
            "type": "boolean",
            "readOnly": true
          },
          "actor": {
            "$ref": "#/components/schemas/ClaimsIdentity"
          },
          "bootstrapContext": {
            "nullable": true
          },
          "claims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Claim"
            },
            "nullable": true,
            "readOnly": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "nameClaimType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "roleClaimType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "Client": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateApiKeyRequest": {
        "required": [
          "scopes"
        ],
        "type": "object",
        "properties": {
          "accountRID": {
            "type": "string",
            "description": "The account resource ID (RID) to associate with the API key (required). This is used for scoping the API key to a specific account.",
            "nullable": true
          },
          "clientId": {
            "type": "string",
            "description": "The client ID to associate with the API key (optional). If not provided, the client ID from the authenticated user will be used.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "The API key description (optional).",
            "nullable": true
          },
          "expiresInDays": {
            "maximum": 365,
            "minimum": 30,
            "type": "integer",
            "description": "The API key expiration in days (optional; defaults to 365).",
            "format": "int32"
          },
          "scopes": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "At least one scope is required. Omitted, null, or empty scopes are rejected by model validation\r\nbefore the request reaches the controller (SFID-3108). When provided, scopes must be a subset of\r\nthe target client's own `AllowedScopes` - the client identified by Citrix.WCS.Services.Authentication.ApiKeys.API.CreateApiKeyRequest.ClientId if\r\nprovided, otherwise the caller's own client. Naming a different client via Citrix.WCS.Services.Authentication.ApiKeys.API.CreateApiKeyRequest.ClientId\r\nis the supported way to mint a key on behalf of another client (e.g. `scim-provisioning`);\r\nrequesting any scope outside that target client's own `AllowedScopes` returns 400 Bad Request\r\nnaming the disallowed scope(s) (SFID-2831)."
          },
          "additionalClaims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClaimDto"
            },
            "description": "Additional claims to include in the API key (optional). Privileged/identity claim types (e.g.\r\n`role`, `scope`, `sub`, `tenant`, `acct`, `ShareFileTenantRID`, and\r\nother token-integrity claims) are never permitted here and return 403 Forbidden, regardless of the\r\ncaller's own privileges - there is no administrative bypass (SFID-2831).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the request to create an API key."
      },
      "CreatePersonalAccessTokenRequest": {
        "required": [
          "subject"
        ],
        "type": "object",
        "properties": {
          "subject": {
            "minLength": 1,
            "type": "string",
            "description": "The subject associated with the personal access token."
          },
          "description": {
            "type": "string",
            "description": "The personal access token description (optional).",
            "nullable": true
          },
          "expirationDateUtc": {
            "type": "string",
            "description": "The personal access token expiration UTC date (optional). Omit it to request a token that never expires, which is\r\ngiven the configured maximum lifetime (Citrix.WCS.Services.Authentication.PersonalAccessTokens.IPersonalAccessTokenLifetimeProvider.MaxLifetimeDays, 10 years by default).\r\nA date further out than that maximum is rejected.",
            "format": "date-time",
            "nullable": true
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Scopes to include in the personal access token (optional).",
            "nullable": true
          },
          "additionalClaims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequestClaim"
            },
            "description": "Additional claims to include in the personal access token (optional).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the request to create a personal access token."
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "RequestClaim": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The claim type (required).",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "The claim value (required).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a claim in a request payload."
      },
      "SessionResponse": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "description": "Session Identifier",
            "nullable": true,
            "readOnly": true
          },
          "subject": {
            "type": "string",
            "description": "User RID of the user the session is for",
            "nullable": true,
            "readOnly": true
          },
          "createdOn": {
            "type": "string",
            "description": "Date/Time session was created",
            "format": "date-time",
            "readOnly": true
          },
          "expiresOn": {
            "type": "string",
            "description": "Date/Time session expires",
            "format": "date-time",
            "readOnly": true
          },
          "renewedOn": {
            "type": "string",
            "description": "Date/Time session was renewed via refresh token",
            "format": "date-time",
            "readOnly": true
          },
          "ipAddress": {
            "type": "string",
            "description": "User's IP Address when the session was created",
            "nullable": true,
            "readOnly": true
          },
          "location": {
            "type": "string",
            "description": "User's location based on the IPAddress",
            "nullable": true,
            "readOnly": true
          },
          "operatingSystem": {
            "type": "string",
            "description": "User's operating system when the session was created",
            "nullable": true,
            "readOnly": true
          },
          "isDesktop": {
            "type": "boolean",
            "description": "Whether user is on a desktop device\r\nExamples:",
            "readOnly": true
          },
          "clients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Client"
            },
            "description": "List of Clients that are part of the User Session",
            "nullable": true,
            "readOnly": true
          },
          "isCurrentSession": {
            "type": "boolean",
            "description": "Whether the session is the current session for the user\r\nExamples:",
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a user's session in the Authentication service."
      },
      "SessionResponseListItemResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionResponse"
            },
            "nullable": true
          },
          "continuationToken": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Token": {
        "type": "object",
        "properties": {
          "allowedSigningAlgorithms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "confirmation": {
            "type": "string",
            "nullable": true
          },
          "audiences": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "issuer": {
            "type": "string",
            "nullable": true
          },
          "creationTime": {
            "type": "string",
            "format": "date-time"
          },
          "lifetime": {
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "clientId": {
            "type": "string",
            "nullable": true
          },
          "accessTokenType": {
            "$ref": "#/components/schemas/AccessTokenType"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "includeJwtId": {
            "type": "boolean"
          },
          "claims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Claim"
            },
            "nullable": true
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "subjectId": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "sessionId": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      }
    }
  }
}