2023-10-03 16:11:25 +00:00
|
|
|
import "pkg:/source/api/userauth.bs"
|
|
|
|
import "pkg:/source/api/baserequest.bs"
|
|
|
|
import "pkg:/source/utils/config.bs"
|
2023-05-03 21:21:04 +00:00
|
|
|
|
2022-05-29 20:00:38 +00:00
|
|
|
sub init()
|
|
|
|
m.top.functionName = "monitorQuickConnect"
|
|
|
|
end sub
|
|
|
|
|
|
|
|
sub monitorQuickConnect()
|
|
|
|
authenticated = checkQuickConnect(m.top.secret)
|
|
|
|
|
|
|
|
if authenticated = true
|
2024-01-13 17:00:29 +00:00
|
|
|
loggedIn = AuthenticateViaQuickConnect(m.top.secret)
|
|
|
|
if loggedIn
|
|
|
|
currentUser = AboutMe()
|
|
|
|
session.user.Login(currentUser, m.top.saveCredentials)
|
|
|
|
session.user.LoadUserPreferences()
|
|
|
|
LoadUserAbilities()
|
|
|
|
m.top.authenticated = 1
|
|
|
|
return
|
|
|
|
end if
|
2022-05-29 20:00:38 +00:00
|
|
|
end if
|
2024-01-13 17:00:29 +00:00
|
|
|
|
|
|
|
m.top.authenticated = -1
|
2022-05-29 20:00:38 +00:00
|
|
|
end sub
|