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
customerId | Company ID. Normally it is always 1. |
nDBID | The user's ID in TB_User |
strID | The user's login ID |
strPlainPassword | The user's login password. default it is empty. It would be supported on secure login. |
strName | The user's name |
strEmail | The user's email address if the user has it |
strPhoneNumber | The user's phone number if the user has it. |
Description | Login user's information |
ICallback2
In plug-in, a developer can use internal API of IAdminWebPlugin2 server.
getDBConnection
Connection getDBConnection() |
Return | java.sql.Connection |
Description | Get DB connection from DB connection pool in server. |
Common library version | 4.1.x |
sendEmail
void sendEmail(String toEmailID, String title, String content) |
toEmailID | receiver's email ID. |
title | email title. |
content | email content. |
Description | send email to a user. An operator must set up email in setup of adminWeb |
Common library version | 4.1.x |
writeLog
void writeLog(String message) |
message | log message |
Description | Write log in Tomcat log |
Common library version | 4.1.x |
writeErrorLog
void writeErrorLog(String message) |
message | log message |
Description | Write error log in Tomcat log |
Common library version | 4.1.x |
OnInitialized
void OnInitialized() |
Description | Notify initialized to adminWeb. |
Common library version | 4.1.x |
IAdminWebPlugin2
getInterfaceVersion
int getInterfaceVersion() |
Return | most be retured INTERFACE_VERSION |
Description | Notify plug-in's INTERFACE version |
Common library version | 4.1.x |
getType
int getType() |
Return | most be retured TYPE_GENERAL_PLUGIN |
Description | Notify plug-in's type |
Common library version | 4.1.x |
initialize
boolean initialize(String arg) |
Return | result of initialize |
Description | initialize plug-in |
Common library version | 4.1.x |
autheticate
String autheticate(PTTUser2 user, String hashedPassword, boolean passwordVerified, String device, String os, String app, String peerIp, String token) |
user | current seesion's user information |
hashedPassword | user input password by sha512 |
passwordVerified | user input password is verified |
device | user's device |
os | user's OS |
app | user's App information |
peerIp | user'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.
|
Description | check user's authetication |
Common library version | 4.1.x |
allocVideoServer
boolean allocVideoServer(PTTUser2 user, String hashedPassword, boolean passwordVerified, String peerIp, String token) |
user | current seesion's user information |
hashedPassword | user input password by sha512 |
passwordVerified | user input password is verified |
peerIp | user's IP |
token |
user input token or sessionKey
|
Response | True/False |
Description | check user's authetication for video server allocation after login |
Common library version | 4.2.x |
OnError
void OnError(int errCode, String jsonParams) |
errCode | error code. not defined |
jsonParams | extended parameters |
Description | fired error |
Common library version | 4.1.x |
OnExtenedEvent
void OnExtenedEvent(String cmdName, String jsonParams) |
cmdName | commend name. not defined |
jsonParams | extended parameters |
Description | Fired an extended event |
Common library version | 4.1.x |