Software /
code /
prosody
Comparison
util/sasl_cyrus.lua @ 3063:ca149818083d
util.sasl_cyrus: Support for specifying the application name (to pass to Cyrus SASL's init())
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 20 May 2010 11:13:51 +0100 |
parent | 2903:d6da8f8e3502 |
child | 3157:174f3cfe86ff |
comparison
equal
deleted
inserted
replaced
3062:892c49869293 | 3063:ca149818083d |
---|---|
43 end | 43 end |
44 end | 44 end |
45 end | 45 end |
46 | 46 |
47 -- create a new SASL object which can be used to authenticate clients | 47 -- create a new SASL object which can be used to authenticate clients |
48 function new(realm, service_name) | 48 function new(realm, service_name, app_name) |
49 local sasl_i = {}; | 49 local sasl_i = {}; |
50 | 50 |
51 init(service_name); | 51 init(app_name or service_name); |
52 | 52 |
53 sasl_i.realm = realm; | 53 sasl_i.realm = realm; |
54 sasl_i.service_name = service_name; | 54 sasl_i.service_name = service_name; |
55 | 55 |
56 local st, ret = pcall(cyrussasl.server_new, service_name, nil, realm, nil, nil) | 56 local st, ret = pcall(cyrussasl.server_new, service_name, nil, realm, nil, nil) |