-
Notifications
You must be signed in to change notification settings - Fork 61
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
Token Status List & Bitstring Status List v1.0 #551
Conversation
There was a problem hiding this 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.
crates/claims/crates/status/src/impl/bitstream_status_list/mod.rs
Outdated
Show resolved
Hide resolved
165c789
to
ced1def
Compare
Also fix clippy warnings.
I've added const definitions for those standard token status values. |
There was a problem hiding this 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 🚀
There was a problem hiding this 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, |
There was a problem hiding this comment.
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)] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
This PR implements IETF Token Status List and W3C Bitstring Status List v1.0.