@@ -57,13 +57,13 @@ impl AuthCheck {
5757 }
5858 }
5959
60- #[ instrument( name = "auth.async_check " , skip_all) ]
61- pub async fn async_check (
60+ #[ instrument( name = "auth.check " , skip_all) ]
61+ pub async fn check (
6262 & self ,
6363 parts : & Parts ,
6464 conn : & mut AsyncPgConnection ,
6565 ) -> AppResult < Authentication > {
66- let auth = async_authenticate ( parts, conn) . await ?;
66+ let auth = authenticate ( parts, conn) . await ?;
6767
6868 if let Some ( token) = auth. api_token ( ) {
6969 if !self . allow_token {
@@ -172,7 +172,7 @@ impl Authentication {
172172}
173173
174174#[ instrument( skip_all) ]
175- async fn async_authenticate_via_cookie (
175+ async fn authenticate_via_cookie (
176176 parts : & Parts ,
177177 conn : & mut AsyncPgConnection ,
178178) -> AppResult < Option < CookieAuthentication > > {
@@ -198,7 +198,7 @@ async fn async_authenticate_via_cookie(
198198}
199199
200200#[ instrument( skip_all) ]
201- async fn async_authenticate_via_token (
201+ async fn authenticate_via_token (
202202 parts : & Parts ,
203203 conn : & mut AsyncPgConnection ,
204204) -> AppResult < Option < TokenAuthentication > > {
@@ -237,19 +237,16 @@ async fn async_authenticate_via_token(
237237}
238238
239239#[ instrument( skip_all) ]
240- async fn async_authenticate (
241- parts : & Parts ,
242- conn : & mut AsyncPgConnection ,
243- ) -> AppResult < Authentication > {
240+ async fn authenticate ( parts : & Parts , conn : & mut AsyncPgConnection ) -> AppResult < Authentication > {
244241 controllers:: util:: verify_origin ( parts) ?;
245242
246- match async_authenticate_via_cookie ( parts, conn) . await {
243+ match authenticate_via_cookie ( parts, conn) . await {
247244 Ok ( None ) => { }
248245 Ok ( Some ( auth) ) => return Ok ( Authentication :: Cookie ( auth) ) ,
249246 Err ( err) => return Err ( err) ,
250247 }
251248
252- match async_authenticate_via_token ( parts, conn) . await {
249+ match authenticate_via_token ( parts, conn) . await {
253250 Ok ( None ) => { }
254251 Ok ( Some ( auth) ) => return Ok ( Authentication :: Token ( auth) ) ,
255252 Err ( err) => return Err ( err) ,
0 commit comments