tangled
alpha
login
or
join now
malpercio.dev
/
ezpds
0
fork
atom
An easy-to-host PDS on the ATProtocol, MacOS. Grandma-approved.
0
fork
atom
overview
issues
pulls
pipelines
refactor(relay): format oauth_token.rs per cargo fmt
malpercio.dev
4 days ago
9f35918e
c18c71e8
+10
-8
1 changed file
expand all
collapse all
unified
split
crates
relay
src
routes
oauth_token.rs
+10
-8
crates/relay/src/routes/oauth_token.rs
···
64
64
}
65
65
}
66
66
67
67
-
pub fn with_nonce(
68
68
-
error: &'static str,
69
69
-
error_description: &'static str,
70
70
-
nonce: String,
71
71
-
) -> Self {
67
67
+
pub fn with_nonce(error: &'static str, error_description: &'static str, nonce: String) -> Self {
72
68
Self {
73
69
error,
74
70
error_description,
···
120
116
match grant_type {
121
117
"authorization_code" => {
122
118
// Implemented in Phase 5.
123
123
-
OAuthTokenError::new("invalid_grant", "authorization_code grant not yet implemented")
124
124
-
.into_response()
119
119
+
OAuthTokenError::new(
120
120
+
"invalid_grant",
121
121
+
"authorization_code grant not yet implemented",
122
122
+
)
123
123
+
.into_response()
125
124
}
126
125
"refresh_token" => {
127
126
// Implemented in Phase 6.
···
200
199
.unwrap()
201
200
.to_str()
202
201
.unwrap();
203
203
-
assert!(ct.contains("application/json"), "content-type must be application/json");
202
202
+
assert!(
203
203
+
ct.contains("application/json"),
204
204
+
"content-type must be application/json"
205
205
+
);
204
206
}
205
207
206
208
// AC5.1 partial — errors have expected field shape