diff --git a/OMICRON_VERSION b/OMICRON_VERSION index e162c681d..7a85e4caf 100644 --- a/OMICRON_VERSION +++ b/OMICRON_VERSION @@ -1 +1 @@ -154a4a6cd623497cbe893c2cd3ea1c241516bc21 \ No newline at end of file +4dc8037377b68e982fa4c45a2a3a4075779b5624 \ No newline at end of file diff --git a/libs/api/__generated__/Api.ts b/libs/api/__generated__/Api.ts index ec51809b1..471dde944 100644 --- a/libs/api/__generated__/Api.ts +++ b/libs/api/__generated__/Api.ts @@ -34,6 +34,20 @@ export type DerEncodedKeyPair = { publicCert: string } +export type DeviceAccessTokenRequest = { + clientId: string + deviceCode: string + grantType: string +} + +export type DeviceAuthRequest = { + clientId: string +} + +export type DeviceAuthVerify = { + userCode: string +} + export type Digest = { type: 'sha256'; value: string } /** @@ -1305,6 +1319,10 @@ export type Silo = { * timestamp when this resource was last modified */ timeModified: Date + /** + * User provision type + */ + userProvisionType: UserProvisionType } /** @@ -1314,6 +1332,7 @@ export type SiloCreate = { description: string discoverable: boolean name: Name + userProvisionType: UserProvisionType } /** @@ -1589,6 +1608,11 @@ export type UserBuiltinResultsPage = { nextPage?: string | null } +/** + * How users will be provisioned in a silo during authentication. + */ +export type UserProvisionType = 'fixed' | 'jit' + /** * A single page of results */ @@ -2000,6 +2024,16 @@ export type NameSortMode = 'name_ascending' */ export type NameOrIdSortMode = 'name_ascending' | 'name_descending' | 'id_ascending' +export interface DeviceAuthRequestParams {} + +export interface DeviceAuthConfirmParams {} + +export interface DeviceAccessTokenParams {} + +export interface DeviceAuthVerifyParams { + userCode?: string +} + export interface HardwareRacksGetParams { limit?: number | null @@ -3002,6 +3036,52 @@ export class HttpClient { export class Api extends HttpClient { methods = { + /** + * Start an OAuth 2.0 Device Authorization Grant + */ + deviceAuthRequest: (query: DeviceAuthRequestParams, params: RequestParams = {}) => + this.request({ + path: `/device/auth`, + method: 'POST', + ...params, + }), + + /** + * Confirm an OAuth 2.0 Device Authorization Grant + */ + deviceAuthConfirm: ( + query: DeviceAuthConfirmParams, + body: DeviceAuthVerify, + params: RequestParams = {} + ) => + this.request({ + path: `/device/confirm`, + method: 'POST', + body, + ...params, + }), + + /** + * Request a device access token + */ + deviceAccessToken: (query: DeviceAccessTokenParams, params: RequestParams = {}) => + this.request({ + path: `/device/token`, + method: 'POST', + ...params, + }), + + /** + * Verify an OAuth 2.0 Device Authorization Grant + */ + deviceAuthVerify: (query: DeviceAuthVerifyParams, params: RequestParams = {}) => + this.request({ + path: `/device/verify`, + method: 'GET', + query, + ...params, + }), + /** * List racks in the system. */ diff --git a/libs/api/__generated__/OMICRON_VERSION b/libs/api/__generated__/OMICRON_VERSION index 50acf1766..e4e3ae72f 100644 --- a/libs/api/__generated__/OMICRON_VERSION +++ b/libs/api/__generated__/OMICRON_VERSION @@ -1,2 +1,2 @@ # generated file. do not update manually. see docs/update-pinned-api.md -0d2410071711d7ecdd3c115ebfb93b3ea3e1e16b +4dc8037377b68e982fa4c45a2a3a4075779b5624