Hi guys, I am testing the auth_jwt module with a postgres backend database and 
it appears to be using Mysql syntax, so I am getting error below, as I dont 
think UNIX_TIMESTAMP is a postgres function and its not happy with the quotes.

See output below, just testing with the example tag;


Dec 20 14:08:56 [13688] --[96gpfj5qgkseqevkhv5a] RT_REGISTER token is 
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0YWciOiJzcGFjZS1tb25rZXkifQ.4JxP0_a-l6uDhjP50JaocheyvgQGhB-0zJsYpFTACkgDec
 20 14:08:56 [13688] DBG:auth_jwt:jwt_authorize: Decoded JWT and found claim 
tag with value space-monkey
Dec 20 14:08:56 [13688] DBG:auth_jwt:jwt_authorize: built JWT raw db query 
[SELECT a.sip_username,b.secret from jwt_profiles a inner join jwt_secrets b on 
a.tag = b.corresponding_tag  where a.tag="space-monkey" and UNIX_TIMESTAMP() >= 
b.start_ts and UNIX_TIMESTAMP() < b.end_ts]
Dec 20 14:08:56 [13688] DBG:db_postgres:db_postgres_submit_query: 
0x7fa87dcac018 PQsendQuery(SELECT a.sip_username,b.secret from jwt_profiles a 
inner join jwt_secrets b on a.tag = b.corresponding_tag  where 
a.tag="space-monkey" and UNIX_TIMESTAMP() >= b.start_ts and UNIX_TIMESTAMP() < 
b.end_ts)
Dec 20 14:08:56 [13688] DBG:db_postgres:db_postgres_submit_query: 
0x7fa87dcac018 PQsendQuery failed: ERROR:  column "space-monkey" does not exist
LINE 1: ...ets b on a.tag = b.corresponding_tag  where a.tag="space-mon...
                                                             ^
Query: SELECT a.sip_username,b.secret from jwt_profiles a inner join 
jwt_secrets b on a.tag = b.corresponding_tag  where a.tag="space-monkey" and 
UNIX_TIMESTAMP() >= b.start_ts and UNIX_TIMESTAMP() < b.end_ts
Dec 20 14:08:56 [13688] DBG:db_postgres:free_query: PQclear(0x556a28109850) 
result set
Dec 20 14:08:56 [13688] ERROR:db_postgres:db_postgres_submit_query: 
0x7fa87dcac018 PQsendQuery Error: ERROR:  column "space-monkey" does not exist
LINE 1: ...ets b on a.tag = b.corresponding_tag  where a.tag="space-mon...
                                                             ^
Query: SELECT a.sip_username,b.secret from jwt_profiles a inner join 
jwt_secrets b on a.tag = b.corresponding_tag  where a.tag="space-monkey" and 
UNIX_TIMESTAMP() >= b.start_ts and UNIX_TIMESTAMP() < b.end_ts
Dec 20 14:08:56 [13688] ERROR:core:db_do_raw_query: error while submitting query
Dec 20 14:08:56 [13688] ERROR:auth_jwt:jwt_authorize: raw_query failed


I have installed from sources, am I missing something here or missed a step? 
Any help would be great as really want to get this module working.

Thanks!

Jon

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to