use of org.dcache.srm.SRMInternalErrorException in project dcache by dCache.
the class DcacheUserManager method login.
protected LoginReply login(CertPath path, String remoteIP) throws SRMInternalErrorException, SRMAuthorizationException {
try {
Subject subject = new Subject();
subject.getPublicCredentials().add(path);
try {
subject.getPrincipals().add(new Origin(remoteIP));
} catch (UnknownHostException e) {
LOGGER.info("Could not add origin {}: {}", remoteIP, e.getMessage());
}
return loginStrategy.login(subject);
} catch (PermissionDeniedCacheException e) {
throw new SRMAuthorizationException(e.getMessage(), e);
} catch (CacheException e) {
throw new SRMInternalErrorException(e.getMessage(), e);
}
}
Aggregations