Skip to content

Commit 2f28ef8

Browse files
ahliliana
authored andcommitted
not working
1 parent 8d13230 commit 2f28ef8

File tree

7 files changed

+53
-46
lines changed

7 files changed

+53
-46
lines changed

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ members = [
2121
"sled-agent",
2222
"sled-agent-client",
2323
"sp-sim",
24+
"oxide-client",
2425
"oximeter/oximeter",
2526
"oximeter/collector",
2627
"oximeter/db",
@@ -50,6 +51,7 @@ default-members = [
5051
"sled-agent",
5152
"sled-agent-client",
5253
"sp-sim",
54+
"oxide-client",
5355
"oximeter/oximeter",
5456
"oximeter/collector",
5557
"oximeter/db",
@@ -99,8 +101,8 @@ panic = "abort"
99101
#
100102
#[patch."https://github.com/oxidecomputer/progenitor"]
101103
#progenitor = { path = "../progenitor/progenitor" }
102-
#[patch."https://github.com/oxidecomputer/typify"]
103-
#typify = { path = "../typify/typify" }
104+
[patch.crates-io]
105+
typify = { git = "https://github.com/oxidecomputer/typify" }
104106

105107
#
106108
# We maintain a fork of pq-sys to address upstream issues. See the

nexus/src/external_api/device_auth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub struct DeviceAuthRequest {
6161
method = POST,
6262
path = "/device/auth",
6363
content_type = "application/x-www-form-urlencoded",
64-
tags = ["hidden"], // "token"
64+
unpublished = true,
6565
}]
6666
pub async fn device_auth_request(
6767
rqctx: Arc<RequestContext<Arc<ServerContext>>>,

nexus/tests/output/nexus_tags.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ API operations found with tag "hidden"
1717
OPERATION ID URL PATH
1818
device_access_token /device/token
1919
device_auth_confirm /device/confirm
20-
device_auth_request /device/auth
2120
logout /logout
2221
session_me /session/me
2322
spoof_login /login

openapi/nexus.json

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -478,36 +478,6 @@
478478
}
479479
}
480480
},
481-
"/device/auth": {
482-
"post": {
483-
"tags": [
484-
"hidden"
485-
],
486-
"summary": "Start an OAuth 2.0 Device Authorization Grant",
487-
"description": "This endpoint is designed to be accessed from an *unauthenticated* API client. It generates and records a `device_code` and `user_code` which must be verified and confirmed prior to a token being granted.",
488-
"operationId": "device_auth_request",
489-
"requestBody": {
490-
"content": {
491-
"application/x-www-form-urlencoded": {
492-
"schema": {
493-
"$ref": "#/components/schemas/DeviceAuthRequest"
494-
}
495-
}
496-
},
497-
"required": true
498-
},
499-
"responses": {
500-
"default": {
501-
"description": "",
502-
"content": {
503-
"*/*": {
504-
"schema": {}
505-
}
506-
}
507-
}
508-
}
509-
}
510-
},
511481
"/device/confirm": {
512482
"post": {
513483
"tags": [
@@ -6779,18 +6749,6 @@
67796749
"grant_type"
67806750
]
67816751
},
6782-
"DeviceAuthRequest": {
6783-
"type": "object",
6784-
"properties": {
6785-
"client_id": {
6786-
"type": "string",
6787-
"format": "uuid"
6788-
}
6789-
},
6790-
"required": [
6791-
"client_id"
6792-
]
6793-
},
67946752
"DeviceAuthVerify": {
67956753
"type": "object",
67966754
"properties": {

oxide-client/Cargo.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[package]
2+
name = "oxide-client"
3+
version = "0.1.0"
4+
edition = "2021"
5+
license = "MPL-2.0"
6+
7+
[dependencies]
8+
progenitor = { git = "https://github.com/oxidecomputer/progenitor" }
9+
#serde_json = "1.0"
10+
11+
[dependencies.chrono]
12+
version = "0.4"
13+
features = [ "serde" ]
14+
15+
[dependencies.reqwest]
16+
version = "0.11"
17+
default-features = false
18+
features = ["rustls-tls", "stream"]
19+
20+
[dependencies.serde]
21+
version = "1.0"
22+
features = [ "derive" ]
23+
24+
[dependencies.uuid]
25+
version = "1.1.0"
26+
features = [ "serde", "v4" ]

oxide-client/src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// This Source Code Form is subject to the terms of the Mozilla Public
2+
// License, v. 2.0. If a copy of the MPL was not distributed with this
3+
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4+
5+
//! Interface for making API requests to the Oxide control plane.
6+
7+
// progenitor::generate_api!(
8+
// spec = "../openapi/nexus.json",
9+
// interface = Builder,
10+
// tags = Separate,
11+
// );

0 commit comments

Comments
 (0)