-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Description
It's part of the token, so I think it should be included so we don't have to instruct the user to add it.
omicron/nexus/tests/integration_tests/scim.rs
Lines 446 to 450 in 9617f40
| RequestBuilder::new(client, Method::GET, "/scim/v2/Users") | |
| .header( | |
| http::header::AUTHORIZATION, | |
| format!("Bearer oxide-scim-{}", created_token.bearer_token), | |
| ) |
This is how we do it with regular access tokens:
omicron/nexus/db-model/src/device_auth.rs
Lines 184 to 193 in 9617f40
| impl From<DeviceAccessToken> for views::DeviceAccessTokenGrant { | |
| fn from(access_token: DeviceAccessToken) -> Self { | |
| Self { | |
| access_token: format!("oxide-token-{}", access_token.token), | |
| token_type: views::DeviceAccessTokenType::Bearer, | |
| token_id: access_token.id.into_untyped_uuid(), | |
| time_expires: access_token.time_expires, | |
| } | |
| } | |
| } |
It would be trivial to add for SCIM tokens:
omicron/nexus/db-model/src/scim_client_bearer_token.rs
Lines 44 to 53 in 9617f40
| impl From<ScimClientBearerToken> for views::ScimClientBearerTokenValue { | |
| fn from(t: ScimClientBearerToken) -> views::ScimClientBearerTokenValue { | |
| views::ScimClientBearerTokenValue { | |
| id: t.id, | |
| time_created: t.time_created, | |
| time_expires: t.time_expires, | |
| bearer_token: t.bearer_token, | |
| } | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
No labels