Skip to content

Commit

Permalink
Refactor crate into smaller private modules
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This removes the public `devicecode` and `revocation`
modules, instead re-exporting all of their public types from the root
of the crate. Most if not all of these types were already being
re-exported from the root; this change removes any import ambiguity.
  • Loading branch information
ramosbugs committed Feb 25, 2024
1 parent 438e5d1 commit de29387
Show file tree
Hide file tree
Showing 19 changed files with 5,257 additions and 5,084 deletions.
1 change: 0 additions & 1 deletion examples/github_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
//!
use oauth2::basic::BasicClient;
// Alternatively, this can be `oauth2::curl::http_client` or a custom client.
use oauth2::reqwest::async_http_client;
use oauth2::{
AuthUrl, AuthorizationCode, ClientId, ClientSecret, CsrfToken, RedirectUrl, Scope,
Expand Down
2 changes: 1 addition & 1 deletion examples/google.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//! ...and follow the instructions.
//!
use oauth2::{basic::BasicClient, revocation::StandardRevocableToken, TokenResponse};
use oauth2::{basic::BasicClient, StandardRevocableToken, TokenResponse};
// Alternatively, this can be oauth2::curl::http_client or a custom.
use oauth2::reqwest::http_client;
use oauth2::{
Expand Down
6 changes: 4 additions & 2 deletions examples/google_devicecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
use oauth2::basic::BasicClient;
// Alternatively, this can be oauth2::curl::http_client or a custom.
use oauth2::devicecode::{DeviceAuthorizationResponse, ExtraDeviceAuthorizationFields};
use oauth2::reqwest::http_client;
use oauth2::{AuthType, AuthUrl, ClientId, ClientSecret, DeviceAuthorizationUrl, Scope, TokenUrl};
use oauth2::{
AuthType, AuthUrl, ClientId, ClientSecret, DeviceAuthorizationResponse, DeviceAuthorizationUrl,
ExtraDeviceAuthorizationFields, Scope, TokenUrl,
};
use serde::{Deserialize, Serialize};

use std::collections::HashMap;
Expand Down
5 changes: 3 additions & 2 deletions examples/microsoft_devicecode_common_user.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use oauth2::basic::BasicClient;
use oauth2::devicecode::StandardDeviceAuthorizationResponse;
use oauth2::reqwest::async_http_client;
use oauth2::{AuthUrl, ClientId, DeviceAuthorizationUrl, Scope, TokenUrl};
use oauth2::{
AuthUrl, ClientId, DeviceAuthorizationUrl, Scope, StandardDeviceAuthorizationResponse, TokenUrl,
};

use std::error::Error;

Expand Down
2 changes: 1 addition & 1 deletion examples/microsoft_devicecode_tenant_user.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use oauth2::basic::BasicClient;
use oauth2::devicecode::StandardDeviceAuthorizationResponse;
use oauth2::reqwest::async_http_client;
use oauth2::StandardDeviceAuthorizationResponse;
use oauth2::{AuthUrl, ClientId, DeviceAuthorizationUrl, Scope, TokenUrl};

use std::error::Error;
Expand Down
13 changes: 5 additions & 8 deletions examples/wunderlist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@
//! ...and follow the instructions.
//!
use oauth2::TokenType;
use oauth2::{
basic::{
BasicErrorResponse, BasicRevocationErrorResponse, BasicTokenIntrospectionResponse,
BasicTokenType,
},
revocation::StandardRevocableToken,
use oauth2::basic::{
BasicErrorResponse, BasicRevocationErrorResponse, BasicTokenIntrospectionResponse,
BasicTokenType,
};
// Alternatively, this can be `oauth2::curl::http_client` or a custom client.
use oauth2::helpers;
use oauth2::{StandardRevocableToken, TokenType};
// Alternatively, this can be `oauth2::curl::http_client` or a custom client.
use oauth2::reqwest::http_client;
use oauth2::{
AccessToken, AuthUrl, AuthorizationCode, Client, ClientId, ClientSecret, CsrfToken,
Expand Down
Loading

0 comments on commit de29387

Please sign in to comment.