Skip to content

Commit a28705d

Browse files
authored
make AtprotoClientMetadata's client_uri optional (#270)
1 parent 498c97f commit a28705d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: atrium-oauth/oauth-client/src/atproto.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub struct AtprotoLocalhostClientMetadata {
108108
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
109109
pub struct AtprotoClientMetadata {
110110
pub client_id: String,
111-
pub client_uri: String,
111+
pub client_uri: Option<String>,
112112
pub redirect_uris: Vec<String>,
113113
pub token_endpoint_auth_method: AuthMethod,
114114
pub grant_types: Vec<GrantType>,
@@ -209,7 +209,7 @@ impl TryIntoOAuthClientMetadata for AtprotoClientMetadata {
209209
}
210210
Ok(OAuthClientMetadata {
211211
client_id: self.client_id,
212-
client_uri: Some(self.client_uri),
212+
client_uri: self.client_uri,
213213
redirect_uris: self.redirect_uris,
214214
token_endpoint_auth_method: Some(self.token_endpoint_auth_method.into()),
215215
grant_types: Some(self.grant_types.into_iter().map(|v| v.into()).collect()),
@@ -331,7 +331,7 @@ gbGGr0pN+oSing7cZ0169JaRHTNh+0LNQXrFobInX6cj95FzEdRyT4T3
331331
fn test_client_metadata() {
332332
let metadata = AtprotoClientMetadata {
333333
client_id: String::from("https://example.com/client_metadata.json"),
334-
client_uri: String::from("https://example.com"),
334+
client_uri: Some(String::from("https://example.com")),
335335
redirect_uris: vec![String::from("https://example.com/callback")],
336336
token_endpoint_auth_method: AuthMethod::PrivateKeyJwt,
337337
grant_types: vec![GrantType::AuthorizationCode],

0 commit comments

Comments
 (0)