Add Imgur provider

This commit is contained in:
Curtis McEnroe 2015-12-21 22:31:47 -05:00
parent cd66c77a94
commit 3d8bd4eb1a
1 changed files with 11 additions and 0 deletions

View File

@ -43,3 +43,14 @@ impl Provider for GitHub {
fn auth_uri() -> &'static str { "https://github.com/login/oauth/authorize" }
fn token_uri() -> &'static str { "https://github.com/login/oauth/access_token" }
}
/// Imgur OAuth 2.0 provider.
///
/// See [OAuth 2.0, Imgur](https://api.imgur.com/oauth2).
pub struct Imgur;
impl Provider for Imgur {
type Lifetime = Expiring;
type Token = Bearer<Expiring>;
fn auth_uri() -> &'static str { "https://api.imgur.com/oauth2/authorize" }
fn token_uri() -> &'static str { "https://api.imgur.com/oauth2/token" }
}