How do use LAContextMBS?

A user wants to do fingerprint instead of entering a password. According to my Goggle LAContextMBS should do the trick. With AuthorizationMBS I can do a shellscript including parameters. How do I do this with LAContextMBS?

'do Authorization
dim theAuthorisation as new AuthorizationMBS
if not theAuthorisation.SimpleNewAuthorization then 
  globals.theErrorLog.LogItem(CurrentMethodName + " no Authorization")
  Return False
end if

dim s(-1) as string
theAuthorisation.Execute(InternalFolder.UnixpathMBS, s, true)
if theAuthorisation.LastError = 0 then
  dim theResult as Integer = theAuthorisation.Wait
  #Pragma Unused theResult
  Return True
  globals.theErrorLog.DialogErrorProceed(kErrorWrite + " " + Str(theAuthorisation.LastError))
  Return False
end if

I tried the LAContextMBS example and did a simple “whoami” as shellscript. But the result was my username and not root. Or is this expected?


@Christian_Schmitz ?

Sorry, I didn’t answer as I don’t have an answer right now.

I would have to look myself into some examples from Apple and translate them.

Thanks! I saw another method using NSFileManagerMBS. But this doesn’t support biometry.