Ejemplo n.º 1
0
 @Override
 public void authorize(Subject user, ConnectionHeader connection) throws AuthorizationException {
   if (authorize) {
     Class<?> protocol = null;
     try {
       protocol = getProtocolClass(connection.getProtocol(), getConf());
     } catch (ClassNotFoundException cfne) {
       throw new AuthorizationException("Unknown protocol: " + connection.getProtocol());
     }
     ServiceAuthorizationManager.authorize(user, protocol);
   }
 }