public interface IReportPortalLogin
Modifier and Type | Method and Description |
---|---|
boolean |
checkLogin(long reportPortalId,
java.util.HashMap Resources)
Validates the login.
|
java.lang.String |
getLoginScreen(long reportPortalId,
java.util.HashMap resources)
Gets the login screen for the report portal.
|
java.lang.String getLoginScreen(long reportPortalId, java.util.HashMap resources)
Name: <input type=text name=plugin_login length=10><br> Password: <input type=password name=plugin_pw length=10> <input type=submit value="login" name=plugin_loginButton>As can be seen from this example code, all input field names must start with "plugin". This is to avoid any conflicts with any fields produced by Opinio. The example includes two fields: "plugin_login" and "plugin_pw". When The user enters the values and clicks the button (must also be provided in the code), Opinio will receive the form and return it through a call to the checkLogin() method of this interface. It is then up to the plugin to validate the login by returning true/false.
reportPortalId
- Id of the report portalresources
- This HashMap contains both the HttpRequest and HttpResponse
objects, if the current report portal is web based. In future versions,
other types of objects must be retrieved, if other protocols
are used - WAP, for example. The HTTP objects must be retrieved this way:HttpRequest request = (HttpRequest) resources.get("HttpRequest"); -- or -- HttpResponse response = (HttpResponse) resources.get("HttpResponse");Then these objects should contain the values needed to display the login screen. In most cases, no values are needed at all, but you may want to display some default login name from a cookie, for example.
boolean checkLogin(long reportPortalId, java.util.HashMap Resources)
reportPortalId
- Id of the report portalResources
- This HashMap contains both the HttpRequest and HttpResponse
objects, if the current survey is web based. In future versions,
other types of objects must be retrieved, if other protocols
are used - WAP, for example. The HTTP objects must be retrieved this way:HttpRequest request = (HttpRequest) resources.get("HttpRequest"); -- or -- HttpResponse response = (HttpResponse) resources.get("HttpResponse");Then these objects should contain the values needed validate the login, by retrieving the login/pw from the request object, and validating it towards an LDAP directory, for example.
Built on October 20 2023