Return counter value from counter_incr function

This commit is contained in:
mdecimus
2024-02-21 13:07:10 +01:00
parent 75bb02d13a
commit be7c4cca73
7 changed files with 47 additions and 31 deletions

View File

@@ -434,15 +434,13 @@ fn parse_code_redirect(uri: String, state: &str) -> String {
fn unwrap_token_response(response: TokenResponse) -> (String, Option<String>, u64) {
match response {
TokenResponse::Granted {
access_token,
token_type,
expires_in,
refresh_token,
..
} => {
assert_eq!(token_type, "bearer");
(access_token, refresh_token, expires_in)
TokenResponse::Granted(granted) => {
assert_eq!(granted.token_type, "bearer");
(
granted.access_token,
granted.refresh_token,
granted.expires_in,
)
}
TokenResponse::Error { error } => panic!("Expected granted, got {:?}", error),
}