Mercurial > prosody-modules
comparison mod_http_xep227/mod_http_xep227.lua @ 4999:65cdbbf9703a
mod_http_xep227: Updates for new mod_tokenauth (trunk/0.13 only)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 13 Jul 2022 11:21:19 +0100 |
parents | 0f5f2d4475b9 |
children |
comparison
equal
deleted
inserted
replaced
4998:5ab134b7e510 | 4999:65cdbbf9703a |
---|---|
344 if not (auth_type and auth_data) then | 344 if not (auth_type and auth_data) then |
345 return false; | 345 return false; |
346 end | 346 end |
347 | 347 |
348 if auth_type == "Bearer" then | 348 if auth_type == "Bearer" then |
349 local token_info = tokens.get_token_info(auth_data); | 349 return tokens.get_token_session(auth_data); |
350 if not token_info or not token_info.session then | |
351 return false; | |
352 end | |
353 return token_info.session; | |
354 end | 350 end |
355 return nil; | 351 return nil; |
356 end | 352 end |
357 | 353 |
358 local function check_auth(routes) | 354 local function check_auth(routes) |