Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function provider.test_password(username, password)
- username = nodeprep(username);
- if not username then
- return nil, "jid-malformed";
- end
- body, code, headers = http.request {
- url = auth_url...'?username='..url.encode(username)..'&password='..url.encode(password);
- }
- if code == 200 then
- return true;
- else
- return nil, "policy-violation";
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement