[−][src]Trait rocket_oauth2::Provider
A Provider
can retrieve authorization and token exchange URIs specific to
an OAuth service provider.
In most cases, StaticProvider
should be used instead of implementing
Provider
manually. Provider
should be implemented if the URIs will
change during runtime.
Required methods
fn auth_uri(&self) -> Cow<'_, str>
Returns the authorization URI associated with the service provider.
Example
use rocket_oauth2::{Provider, StaticProvider}; assert_eq!(StaticProvider::GitHub.auth_uri(), "https://github.com/login/oauth/authorize");
fn token_uri(&self) -> Cow<'_, str>
Returns the token exchange URI associated with the service provider.
Example
use rocket_oauth2::{Provider, StaticProvider}; assert_eq!(StaticProvider::GitHub.token_uri(), "https://github.com/login/oauth/access_token");