Skip to content

SCIM token should include oxide-scim- prefix #9300

@david-crespo

Description

@david-crespo

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.

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:

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:

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions