Search in sources :

Example 1 with BindingType

use of org.apache.chemistry.opencmis.commons.enums.BindingType in project copper-cms by PogeyanOSS.

the class SecurityTest method run.

@Override
public void run(Session session) throws Exception {
    CmisTestResult f;
    BindingType binding = getBinding();
    addResult(createInfoResult("Binding: " + binding));
    f = createResult(WARNING, "HTTPS is not used. Credentials might be transferred as plain text!");
    switch(binding) {
        case ATOMPUB:
            if (!isHttpsUrl(getParameters().get(SessionParameter.ATOMPUB_URL))) {
                addResult(f);
            }
            break;
        case WEBSERVICES:
            if (!isHttpsUrl(getParameters().get(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE))) {
                addResult(f);
            }
            break;
        case BROWSER:
            if (!isHttpsUrl(getParameters().get(SessionParameter.BROWSER_URL))) {
                addResult(f);
            }
            break;
        default:
    }
}
Also used : BindingType(org.apache.chemistry.opencmis.commons.enums.BindingType) CmisTestResult(org.apache.chemistry.opencmis.tck.CmisTestResult)

Aggregations

BindingType (org.apache.chemistry.opencmis.commons.enums.BindingType)1 CmisTestResult (org.apache.chemistry.opencmis.tck.CmisTestResult)1