mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2026-01-07 03:31:31 +01:00
Allow overriding metadata url used during testing
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
use yup_oauth2::authenticator::ApplicationDefaultCredentialsTypes;
|
||||
use yup_oauth2::ApplicationDefaultCredentialsAuthenticator;
|
||||
use yup_oauth2::ApplicationDefaultCredentialsFlowOpts;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let auth = match ApplicationDefaultCredentialsAuthenticator::builder().await {
|
||||
let opts = ApplicationDefaultCredentialsFlowOpts::default();
|
||||
let auth = match ApplicationDefaultCredentialsAuthenticator::builder(opts).await {
|
||||
ApplicationDefaultCredentialsTypes::InstanceMetadata(auth) => auth
|
||||
.build()
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user