Search in sources :

Example 1 with EisBackendPrincipal

use of com.sun.enterprise.connectors.authentication.EisBackendPrincipal in project Payara by payara.

the class SecurityMapUtils method generateResourcePrincipal.

/**
 * Creates the ResourcePrincipal object from the given securityMap
 *
 * @param securityMap SecurityMap
 * @return created ResourcePrincipal object
 */
private static ResourcePrincipal generateResourcePrincipal(ConnectorSecurityMap securityMap) {
    EisBackendPrincipal backendPrincipal = securityMap.getBackendPrincipal();
    String userName = backendPrincipal.getUserName();
    String password = backendPrincipal.getPassword();
    return new ResourcePrincipal(userName, password);
}
Also used : ResourcePrincipal(com.sun.enterprise.deployment.ResourcePrincipal) EisBackendPrincipal(com.sun.enterprise.connectors.authentication.EisBackendPrincipal)

Example 2 with EisBackendPrincipal

use of com.sun.enterprise.connectors.authentication.EisBackendPrincipal in project Payara by payara.

the class SecurityMapUtils method convertSecurityMapConfigBeanToSecurityMap.

private static ConnectorSecurityMap convertSecurityMapConfigBeanToSecurityMap(SecurityMap securityMap) {
    String name = securityMap.getName();
    List<String> principalList = new ArrayList<String>();
    for (String p : securityMap.getPrincipal()) {
        principalList.add(p);
    }
    List<String> userGroupList = new ArrayList<String>();
    for (String g : securityMap.getUserGroup()) {
        userGroupList.add(g);
    }
    EisBackendPrincipal backendPrincipal = transformBackendPrincipal(securityMap.getBackendPrincipal());
    return new ConnectorSecurityMap(name, principalList, userGroupList, backendPrincipal);
}
Also used : ArrayList(java.util.ArrayList) ConnectorSecurityMap(com.sun.enterprise.connectors.authentication.ConnectorSecurityMap) EisBackendPrincipal(com.sun.enterprise.connectors.authentication.EisBackendPrincipal)

Aggregations

EisBackendPrincipal (com.sun.enterprise.connectors.authentication.EisBackendPrincipal)2 ConnectorSecurityMap (com.sun.enterprise.connectors.authentication.ConnectorSecurityMap)1 ResourcePrincipal (com.sun.enterprise.deployment.ResourcePrincipal)1 ArrayList (java.util.ArrayList)1