liquid_feedback_frontend
view env/util/get_access_token.lua @ 1573:2aedc4fa7e9f
Fixed german translation, typo in show incoming delegations
author | bsw |
---|---|
date | Wed Nov 11 17:23:44 2020 +0100 (2020-11-11) |
parents | 32cc544d5a5b |
children |
line source
1 function util.get_access_token()
3 local access_token_header = request.get_header("Authorization")
4 if access_token_header then
5 access_token_header = string.match(access_token_header, "^Bearer ([^ ,]*)$")
6 end
8 local access_token_param = param.get("access_token")
10 if access_token_header and access_token_param then
11 return nil, "header_and_param"
12 end
14 return(access_token_header or access_token_param)
16 end