Here are the settings that work for us under 6.1.6 (with sensitive information redacted). I've included the groovy script we use too...we send messages via Flowroute (a voip provider). I hope this helps.
cas.authn.mfa.simple.order=0
cas.authn.mfa.simple.timeToKillInSeconds=60
cas.authn.mfa.simple.tokenLength=6
cas.authn.mfa.simple.mail.text=Your one-time authorization token is: %s
cas.authn.mfa.simple.mail.subject=Authorization Token
cas.authn.mfa.simple.sms.text=Your one-time authorization token is: %s
cas.authn.mfa.simple.sms.attributeName=mobile
cas.smsProvider.groovy.location=file:/etc/cas/sendSms.groovy
--- sendSms.groovy ---
@Grab(group = 'org.codehaus.groovy.modules.http-builder', module = 'http-builder', v ersion = '0.7.1')
import java.util.*
import groovyx.net.http.RESTClient
import static groovyx.net.http.ContentType.JSON
import groovy.json.JsonSlurper
class smsSender {
def run(Object[] args) {
def from = args[0]
def to = args[1]
def message = args[2]
def logger = args[3]
logger.debug("Sending message ${message} to ${to} from ${from}")
def jsonObj = new JsonSlurper().parseText('{"to": "${to}", "from": "${from}", "body": "${message}"
}
')
def path = "messages"
client.auth.basic("XXXXXX", "<long key here> ")
path: path,
contentType: JSON,
requestContentType: JSON,
body: jsonObj,
)
return response.status
}
}