use of com.sun.enterprise.connectors.authentication.BasicPasswordAuthenticationService in project Payara by payara.
the class ConnectorSecurityAdminServiceImpl method getAuthenticationService.
/**
* Obtain the authentication service associated with rar module.
* Currently only the BasicPassword authentication is supported.
*
* @param rarName Rar module Name
* @param poolInfo Name of the pool. Used for creation of
* BasicPasswordAuthenticationService
* @return AuthenticationService
*/
public AuthenticationService getAuthenticationService(String rarName, PoolInfo poolInfo) {
ConnectorDescriptor cd = _registry.getDescriptor(rarName);
OutboundResourceAdapter obra = cd.getOutboundResourceAdapter();
Set authMechs = obra.getAuthMechanisms();
for (Object authMech : authMechs) {
AuthMechanism authMechanism = (AuthMechanism) authMech;
String mech = authMechanism.getAuthMechType();
if (mech.equals("BasicPassword")) {
return new BasicPasswordAuthenticationService(rarName, poolInfo);
}
}
return null;
}
Aggregations