Reference of IAdminWebPlugin

Description of IAdminWebPlugin. IAdminWebPlugin2 is in Plugin V4.2 and above.

In plug-in, developers can use internal API of adminWeb.

IPTTPlugin4 IVideoPlugin3 IPublicGWPlugin

PTTUser2

customerIdCompany ID. Normally it is always 1.
nDBIDThe user's ID in TB_User
strIDThe user's login ID
strPlainPasswordThe user's login password. default it is empty. It would be supported on secure login.
strNameThe user's name
strEmailThe user's email address if the user has it
strPhoneNumberThe user's phone number if the user has it.
DescriptionLogin user's information

ICallback2

In plug-in, a developer can use internal API of IAdminWebPlugin2 server.

getDBConnection

Connection getDBConnection()
Returnjava.sql.Connection
DescriptionGet DB connection from DB connection pool in server.
Common library version4.1.x

sendEmail

void sendEmail(String toEmailID, String title, String content)
toEmailIDreceiver's email ID.
titleemail title.
contentemail content.
Descriptionsend email to a user. An operator must set up email in setup of adminWeb
Common library version4.1.x

writeLog

void writeLog(String message)
messagelog message
DescriptionWrite log in Tomcat log
Common library version4.1.x

writeErrorLog

void writeErrorLog(String message)
messagelog message
DescriptionWrite error log in Tomcat log
Common library version4.1.x

OnInitialized

void OnInitialized()
DescriptionNotify initialized to adminWeb.
Common library version4.1.x

IAdminWebPlugin2

getInterfaceVersion

int getInterfaceVersion()
Returnmost be retured INTERFACE_VERSION
DescriptionNotify plug-in's INTERFACE version
Common library version4.1.x

getType

int getType()
Returnmost be retured TYPE_GENERAL_PLUGIN
DescriptionNotify plug-in's type
Common library version4.1.x

initialize

boolean initialize(String arg)
Returnresult of initialize
Descriptioninitialize plug-in
Common library version4.1.x

autheticate

String autheticate(PTTUser2 user, String hashedPassword, boolean passwordVerified, String device, String os, String app, String peerIp, String token)
usercurrent seesion's user information
hashedPassworduser input password by sha512
passwordVerifieduser input password is verified
deviceuser's device
osuser's OS
appuser's App information
peerIpuser's IP
token AuthToken: user input token+[','+other auth token], ex) "1234" or "1234,01012341234"
"retry": have to send 2FA(Two-Factor Authentication) token again. (Please note ProPTT2 app don't support it yet)
Response "success": authetication success
"failure": authetication failure
"failure"+"reason": authetication failure and reason. The reason will be on LoginLog. (Server 8.1.3~ required)
"required": a 2FA(Two-Factor Authentication) key is required
"sessionKey": generated one time session key.
Descriptioncheck user's authetication
Common library version4.1.x

allocVideoServer

boolean allocVideoServer(PTTUser2 user, String hashedPassword, boolean passwordVerified, String peerIp, String token)
usercurrent seesion's user information
hashedPassworduser input password by sha512
passwordVerifieduser input password is verified
peerIpuser's IP
token user input token or sessionKey
ResponseTrue/False
Descriptioncheck user's authetication for video server allocation after login
Common library version4.2.x

OnError

void OnError(int errCode, String jsonParams)
errCodeerror code. not defined
jsonParamsextended parameters
Descriptionfired error
Common library version4.1.x

OnExtenedEvent

void OnExtenedEvent(String cmdName, String jsonParams)
cmdNamecommend name. not defined
jsonParamsextended parameters
DescriptionFired an extended event
Common library version4.1.x