File tree Expand file tree Collapse file tree 2 files changed +1
-17
lines changed Expand file tree Collapse file tree 2 files changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -14,17 +14,6 @@ use crate::provider;
1414use crate :: provider:: Oauth2Authorizer ;
1515use crate :: tools:: time;
1616
17- const OAUTH2_GMAIL : Oauth2 = Oauth2 {
18- // see <https://developers.google.com/identity/protocols/OAuth2InstalledApp>
19- client_id : "959970109878-4mvtgf6feshskf7695nfln6002mom908.apps.googleusercontent.com" ,
20- get_code : "https://accounts.google.com/o/oauth2/auth?client_id=$CLIENT_ID&redirect_uri=$REDIRECT_URI&response_type=code&scope=https%3A%2F%2Fmail.google.com%2F%20email&access_type=offline" ,
21- init_token : "https://accounts.google.com/o/oauth2/token?client_id=$CLIENT_ID&redirect_uri=$REDIRECT_URI&code=$CODE&grant_type=authorization_code" ,
22- refresh_token : "https://accounts.google.com/o/oauth2/token?client_id=$CLIENT_ID&redirect_uri=$REDIRECT_URI&refresh_token=$REFRESH_TOKEN&grant_type=refresh_token" ,
23- get_userinfo : Some (
24- "https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=$ACCESS_TOKEN" ,
25- ) ,
26- } ;
27-
2817const OAUTH2_YANDEX : Oauth2 = Oauth2 {
2918 // see <https://tech.yandex.com/oauth/doc/dg/reference/auto-code-client-docpage/>
3019 client_id : "c4d0b6735fc8420a816d7e1303469341" ,
@@ -279,7 +268,6 @@ impl Oauth2 {
279268 . and_then ( |provider| provider. oauth2_authorizer . as_ref ( ) )
280269 {
281270 return Some ( match oauth2_authorizer {
282- Oauth2Authorizer :: Gmail => OAUTH2_GMAIL ,
283271 Oauth2Authorizer :: Yandex => OAUTH2_YANDEX ,
284272 } ) ;
285273 }
Original file line number Diff line number Diff line change @@ -82,13 +82,9 @@ pub enum UsernamePattern {
8282
8383/// Type of OAuth 2 authorization.
8484#[ derive( Debug , PartialEq , Eq ) ]
85- #[ repr( u8 ) ]
8685pub enum Oauth2Authorizer {
8786 /// Yandex.
88- Yandex = 1 ,
89-
90- /// Gmail.
91- Gmail = 2 ,
87+ Yandex ,
9288}
9389
9490/// Email server endpoint.
You can’t perform that action at this time.
0 commit comments