Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token Status List & Bitstring Status List v1.0 #551

Merged
merged 14 commits into from
Jun 25, 2024

Conversation

timothee-haudebourg
Copy link
Contributor

Copy link
Contributor

@eelanagaraj eelanagaraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it generally looks good (caveat: I don't have a lot of context on the jws & jwt/src changes).

In addition to the other comments, for the IETF status list, it'd be nice to have an enum for the standard status types (VALID, INVALID, SUSPENDED) but that doesn't need to be part of this PR.

Base automatically changed from treeldr to main June 20, 2024 16:40
@timothee-haudebourg timothee-haudebourg force-pushed the skit-183-implement-revocation-for-w3c-vcs branch from 165c789 to ced1def Compare June 21, 2024 13:00
@timothee-haudebourg
Copy link
Contributor Author

it'd be nice to have an enum for the standard status types (VALID, INVALID, SUSPENDED)

I've added const definitions for those standard token status values.

Copy link
Contributor

@eelanagaraj eelanagaraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is looking good! couple comments about additional test cases but then I think this is ready 🚀

Copy link
Contributor

@eelanagaraj eelanagaraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

use super::{MaybeCached, ProviderError, StatusMapProvider, TypedStatusMapProvider};

pub struct HttpClient<V> {
client: reqwest::Client,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with using reqwest directly for the time being, but in the future we should use a trait similar to what openidconnect does https://docs.rs/openidconnect/4.0.0-alpha.2/openidconnect/trait.AsyncHttpClient.html

}

pub trait TypedStatusMapProvider<I: ?Sized, T: EncodedStatusMap> {
#[allow(async_fn_in_trait)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is safe because id isn't Sized?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its always safe. Are you talking about the allow? It's just because the compiler like to warn us that users can't put bounds on the return type of those functions. But we don't care here.

crates/claims/crates/status/src/client/mod.rs Show resolved Hide resolved
crates/claims/crates/status/src/lib.rs Outdated Show resolved Hide resolved
@timothee-haudebourg timothee-haudebourg merged commit e853fb1 into main Jun 25, 2024
4 checks passed
@timothee-haudebourg timothee-haudebourg deleted the skit-183-implement-revocation-for-w3c-vcs branch June 25, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants