feat(GetToken): Add application_secret method to GetToken trait.

This makes decoupling Authenticator and individual flows easier while
allowing for refreshing tokens.
This commit is contained in:
Lewin Bormann
2019-06-13 15:29:18 +02:00
parent 86e71cca5d
commit a656df6b74
4 changed files with 21 additions and 10 deletions

View File

@@ -205,6 +205,10 @@ pub trait GetToken {
I: Iterator<Item = &'b T>;
fn api_key(&mut self) -> Option<String>;
/// Return an application secret with at least token_uri, client_secret, and client_id filled
/// in. This is used for refreshing tokens without interaction from the flow.
fn application_secret(&self) -> ApplicationSecret;
}
/// Represents a token as returned by OAuth2 servers.