Pass Util Function
Request
Method |
URL |
POST |
/smserver/sms.PassUtil |
RAW |
POST /smserver/sms.PassUtil HTTP/1.1 Cache-Control: no-cache Connection: Keep-Alive Pragma: no-cache Content-Type: application/json; charset=UTF-8 Accept: */* Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
[ { "command" : "checkcomplexity", "APass" : "****", "vserver" : "default" } ] |
Explained |
"command":"checkcomplexity"
Used to check if a password meets the complexity criteria defined for a certain vserver. |
Response
Method |
URL |
RAW |
Accept-Encoding: synlz,gzip Content-Type: application/json; charset=UTF-8
{"result":[ { "Result" : -1, "ResultMsg" : "Password is too short" } ],"id":7721} |
Explained |
Result: 1 = success any other value different from 1 = error
ResultMsg: a friendly message (success or error message) explaining what happened |
Request
Method |
URL |
POST |
/smserver/sms.PassUtil |
RAW |
POST /smserver/sms.PassUtil HTTP/1.1 Cache-Control: no-cache Connection: Keep-Alive Pragma: no-cache Content-Type: application/json; charset=UTF-8 Accept: */* Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
[ { "command" : "verify", "password" : "pippo", "salt" : "3080944B", "PassHash" : "1234", "VServer" : "default" } ] |
Explained |
Verifies if a password matches the salt+password as stored in a user's profile.
"command":"verify"
password: password that needs to be verified salt: salt of the original password object PassHash: hash of the origina password object VServer: virtual server that will be asked to verify the password |
Response
Method |
URL |
RAW |
Accept-Encoding: synlz,gzip Content-Type: application/json; charset=UTF-8
{"result":[ { "Result" : -1, "ResultMsg" : "Password not verified" } ],"id":7721} |
Explained |
Result: 1 = success any other value different from 1 = error
ResultMsg: a friendly message (success or error message) explaining what happened |
Request
Method |
URL |
POST |
/smserver/sms.PassUtil |
RAW |
POST /smserver/sms.PassUtil HTTP/1.1 Cache-Control: no-cache Connection: Keep-Alive Pragma: no-cache Content-Type: application/json; charset=UTF-8 Accept: */* Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
[ { "command" : "generate", "password" : "12345678" } ] |
Explained |
Starting from a password, this function generates a salt+hash that uniquely represent it.
"command":"generate"
Password: Password for which we want to generate the "salt" and "hash" codes. |
Response
Method |
URL |
RAW |
Accept-Encoding: synlz,gzip Content-Type: application/json; charset=UTF-8
{"result":[ { "PassHash" : "75cf237875029b5e3d31f8063a289a3407de2553d12712ec2ed81d9a24d11c0b36df28a78c3cd5afeca988b26df7d7f01691c6cb9e0e160ca9c06dc638c5b4fe", "Salt" : "51DB4627", "PHType" : "V4Plus" } ],"id":7721} |
Explained |
PassHash: Hash code of the original password Salt: unique random "salt" PHType: type of the generated password salt+hash |