Ios swift couchbase login using curl

During mobile login, is the below curl command secured enough to be used in Swift3 (iOS) when authenticating user? I’m planning to use Alamofire to execute this.

curl -X POST ‘domain-here.com:4984/dbNameHere/_session’ -H “Content-type: application/json” -d ‘{“name”:“usernameHere”,“password”:“pwHere”}’

-------- result for authorised user --------
{
“authentication_handlers”:[“default”,“cookie”],
“ok”:true,
“userCtx”:
{
“channels”: {
“!”:1,
“channelNameHere”:1399
},
“name”:“usernameHere”
}
}

-------- result for unauthorised user --------
{
“error”:“Unauthorized”,
“reason”:“Invalid login”
}

Yes that looks good. You might want to enable SSL on Sync Gateway to secure the data “on the wire”. See the configuring SSL guide.

James