-
Notifications
You must be signed in to change notification settings - Fork 79
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
Gabbi/add token verify endpoint #59
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.
similar to the way we do other endpoints, consider a dir here for consistency (data structures in mod.rs
, named files for endpoints like get_token_status.rs
. there's only one endpoint though, so i won't block on this unless others also feel strongly.
src/endpoints/user.rs
Outdated
permissions: Vec<String>, | ||
roles: Vec<String>, | ||
} | ||
|
||
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)] | ||
pub struct UserDetails { |
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.
idk if a stutter is objectionable to others, but likely i would reference this module from above, so user::Details
. Same w/ endpoint structs and names, so user::TokenStatus
rather than user::UserTokenStatus
, etc..
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.
Agree, I really like how Go encourages you to write e.g. stream.Buffered
instead of stream.BufferedStream
. It's nice but not essential.
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.
renaming in a public api is hard, so i'd rather block today 😀
Agree that it's nice but not necessary when you only have one file, approved. |
483b44b
to
52b372e
Compare
added suggestions to a pr but i'm not going to block on them, this looks good. |
This PR adds an endpoint for verifying that an API token is active and legitimate.
PLEASE REVIEW THIS ONLY AFTER #58 HAS BEEN MERGED.