Skip to content

Commit

Permalink
Bump oauth2 to 3.0.0-alpha.4
Browse files Browse the repository at this point in the history
  • Loading branch information
David Ramos committed Oct 19, 2019
1 parent 091d3f6 commit 39b68ba
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license = "MIT"
repository = "https://github.com/ramosbugs/openidconnect-rs"

[features]
curl = ["oauth2/curl"]
reqwest = ["oauth2/reqwest"]
default = ["reqwest"]
nightly = []

[dependencies]
Expand All @@ -18,19 +21,19 @@ futures = "0.1"
http = "0.1"
itertools = "0.7.8"
log = "0.4"
oauth2 = "3.0.0-alpha.3"
oauth2 = "3.0.0-alpha.4"
rand = "0.6"
retry = "0.5"
ring = "0.14"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
untrusted = "0.6"
url = "1.0"
url = "2.1"

[dev-dependencies]
color-backtrace = { version = "0.2" }
env_logger = "0.5"
hyper = "0.11"
pretty_assertions = "0.5"
reqwest = "0.9"
reqwest_ = { package = "reqwest", version = "0.9" }
15 changes: 11 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,18 @@ use std::time::Duration;

use oauth2::helpers::variant_name;
use oauth2::ResponseType as OAuth2ResponseType;

#[cfg(feature = "curl")]
pub use oauth2::curl;

#[cfg(feature = "reqwest")]
pub use oauth2::reqwest;

pub use oauth2::{
curl, reqwest, AccessToken, AuthType, AuthUrl, AuthorizationCode, ClientId, ClientSecret,
CodeTokenRequest, CsrfToken, EmptyExtraTokenFields, ErrorResponse, ErrorResponseType,
ExtraTokenFields, HttpRequest, HttpResponse, PkceCodeChallenge, PkceCodeChallengeMethod,
PkceCodeVerifier, RedirectUrl, RefreshToken, RefreshTokenRequest, RequestTokenError, Scope,
AccessToken, AuthType, AuthUrl, AuthorizationCode, ClientId, ClientSecret, CodeTokenRequest,
CsrfToken, EmptyExtraTokenFields, ErrorResponse, ErrorResponseType, ExtraTokenFields,
HttpRequest, HttpResponse, PkceCodeChallenge, PkceCodeChallengeMethod, PkceCodeVerifier,
RedirectUrl, RefreshToken, RefreshTokenRequest, RequestTokenError, Scope,
StandardErrorResponse, StandardTokenResponse, TokenResponse as OAuth2TokenResponse, TokenType,
TokenUrl,
};
Expand Down
9 changes: 7 additions & 2 deletions tests/rp_certification_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extern crate log;
extern crate openidconnect;
#[macro_use]
extern crate pretty_assertions;
extern crate reqwest;
extern crate reqwest_ as reqwest;
extern crate url;

use std::collections::HashMap;
Expand Down Expand Up @@ -102,7 +102,12 @@ impl TestState {
.build()
.unwrap();
let redirect_response = http_client
.execute(http_client.request(Method::GET, url).build().unwrap())
.execute(
http_client
.request(Method::GET, url.as_str())
.build()
.unwrap(),
)
.unwrap();
assert_eq!(redirect_response.status(), StatusCode::SEE_OTHER);
let redirected_url = Url::parse(
Expand Down

0 comments on commit 39b68ba

Please sign in to comment.