Software /
code /
prosody-modules
Comparison
mod_http_xep227/mod_http_xep227.lua @ 5008:bd63feda3704
Merge role-auth
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 22 Aug 2022 15:39:02 +0100 |
parent | 4999:65cdbbf9703a |
comparison
equal
deleted
inserted
replaced
4994:cce12a660b98 | 5008:bd63feda3704 |
---|---|
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) |