sets the security handler
967133
def securityHandler(self, value):
        
        if isinstance(value, BaseSecurityHandler):
            if isinstance(value, security.AGOLTokenSecurityHandler):
                self._securityHandler = value
            elif isinstance(value, security.OAuthSecurityHandler):
                self._securityHandler = value
            else:
                pass
672927
function setExceptionHandler(callable $handler)
    {
        $ExceptionHandler = new TransferHandle;
        $ExceptionHandler->setWhoopsHandle($handler);
        $this->container->set(SysConst::HTTP_EXCEPTION_HANDLER, $ExceptionHandler);
    }
1277523
protected function init_handlers() {
		$keys = [ self::KEY_SCRIPTS, self::KEY_STYLES ];
		foreach ( $keys as $key ) {
			if ( $this->hasConfigKey( $key ) ) {
				$this->add_handler( $key );
			}
		}
	}
439875
public static LinkedBindingBuilder<HandlerWrapper> bindSecurityHandler(final Binder binder)
    {
        return binder.bind(HandlerWrapper.class).annotatedWith(SECURITY_NAMED);
    }
949298
def do_init(self, handler):
        
        self.waiting = True
        self.exc_info = None
        self.handler = handler
1078989
static void setContextClassLoader(final ClassLoader classLoader)
   {
      SecurityManager sm = System.getSecurityManager();
      if (sm == null)
      {
         Thread.currentThread().setContextClassLoader(classLoader);
      }
      else
      {
         AccessController.doPrivileged(new PrivilegedAction<Object>() {
            public Object run()
            {
               Thread.currentThread().setContextClassLoader(classLoader);
               return null;
            }
         });
      }
   }
599765
public void setSecurityManager(CmsSecurityManager securityManager) {

        if (m_frozen) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0));
        }
        m_securityManager = securityManager;
    }
138647
def handle_security(controller, im_self=None):
    
    if controller._pecan.get('secured', False):
        check_permissions = controller._pecan['check_permissions']

        if isinstance(check_permissions, six.string_types):
            check_permissions = getattr(
                im_self or six.get_method_self(controller),
                check_permissions
            )

        if not check_permissions():
            raise exc.HTTPUnauthorized
1029354
protected function securityHandler()
    {
        $routeInfo = $this->route_info;

        // Input Filter
        Security::inputFilter($this->request->getQueryParams());
        Security::inputFilter($this->request->getBodyParams());

        // IP Filter
        Security::ipFilter($routeInfo['controller'], $routeInfo['action'], $this->request);

        // Csrf Token Validation
        Security::validCsrfToken($routeInfo['controller'], $routeInfo['action'], $this->request, $this->response);

        // CORS
        Security::cors($routeInfo['controller'], $routeInfo['action'], $this->response);

        // X-Frame-Options
        Security::x_frame_options($routeInfo['controller'], $routeInfo['action'], $this->response);

        // X-XSS-Protection
        Security::x_xss_protection($routeInfo['controller'], $routeInfo['action'], $this->response);
    }
728862
def handler(self):
        """"""
        if self._handler is None:
            self._handler = self.HTTPSClientAuthHandler(key=self._keyfile,
                                                        cert=self._certificatefile)
        return self._handler
319825
def init_handler(self):
        
        assert self.options.get('host') and self.options.get('port'), "Invalid options"
        assert self.options.get('to'), 'Recipients list is empty. SMTP disabled.'
        if not isinstance(self.options['to'], (list, tuple)):
            self.options['to'] = [self.options['to']]
975777
def securityHandler(self, value):
        
        if isinstance(value, BaseSecurityHandler):
            if isinstance(value, (AGSTokenSecurityHandler,
                                  PortalServerSecurityHandler)):
                self._securityHandler = value
            else:
                pass
        elif value is None:
            self._securityHandler = None
1091671
def set_exit_handler(self):
        
        signal.signal(signal.SIGINT, self.manage_signal)
        signal.signal(signal.SIGTERM, self.manage_signal)
        signal.signal(signal.SIGHUP, self.manage_signal)
        signal.signal(signal.SIGQUIT, self.manage_signal)
1133648
protected function registerHandler()
	{
		$this->app['exception'] = $this->app->share(function($app)
		{
			return new Handler($app, $app['exception.plain'], $app['exception.debug']);
		});
	}
930650
@Reference
    protected void setSecurityService(SecurityService securityService) {
        SibTr.entry(tc, CLASS_NAME + "setSecurityService", securityService);

        this.securityService = securityService;

        SibTr.exit(tc, CLASS_NAME + "setSecurityService");
    }
973423
def _processHandler(self, securityHandler, param_dict):
        """"""
        cj = None
        handler = None
        if securityHandler is None:
            cj = cookiejar.CookieJar()
        elif securityHandler.method.lower() == "token":
            param_dict['token'] = securityHandler.token
            if hasattr(securityHandler, 'cookiejar'):
                cj = securityHandler.cookiejar
            if hasattr(securityHandler, 'handler'):
                handler = securityHandler.handler
        elif securityHandler.method.lower() == "handler":
            handler = securityHandler.handler
            cj = securityHandler.cookiejar
        return param_dict, handler, cj
1009409
def securityHandler(self, value):
        
        if isinstance(value, BaseSecurityHandler):
            if isinstance(value, (security.AGOLTokenSecurityHandler,security.PortalTokenSecurityHandler,security.ArcGISTokenSecurityHandler)):
                self._securityHandler = value

            else:
                raise AttributeError("Admin only supports security.AGOLTokenSecurityHandler")