Set a default redirect_uri if none is provided

master
Paul Woolcock 6 years ago
parent cc083e335e
commit 7f1303b5f6
  1. 5
      src/registration.rs

@ -18,9 +18,14 @@ pub struct Registration {
struct OAuth {
client_id: String,
client_secret: String,
#[serde(default = "default_redirect_uri")]
redirect_uri: String,
}
fn default_redirect_uri() -> String {
"urn:ietf:wg:oauth:2.0:oob".to_string()
}
#[derive(Deserialize)]
struct AccessToken {
access_token: String,

Loading…
Cancel
Save