Integrating code with Interceptors

Hi Guys, I am trying to integrate some interceptor code and sure of
the syntax with cfscript.

I want to integrate the config code into the security interceptor
code.

    //Register interceptors as an array, we need order
    interceptors = [
      //Autowire
      {class="coldbox.system.interceptors.Autowire",
       properties={}
      },
      //SES
      {class="coldbox.system.interceptors.SES",
       properties={configFile="config/routes.cfm"}
      }

    ];

      //Register interceptors as an array, we need order
  interceptors = [
     //Autowire
     {class="coldbox.system.interceptors.Autowire"},
     //SES
     {class="coldbox.system.interceptors.SES"},
     //SES
      {
       class="coldbox.system.interceptors.Security",
         properties={
         useRoutes = true,
         rulesSource = "xml",
         rulesFile = "/config/securityRules.xml.cfm"
       }
     }
  ];

Can you please provide more details? It is difficult for me to understand what your goal is and what your specific issue is.

Thanks.

Aaron Greenlee
http://aarongreenlee.com/

I am thinking I should have something like this. But ColdFusion
Builder says that syntax is wrong. What is the correct syntax to write
the code so I can declare the location of my config file and security
rules file? I know that by convention I do not need to declare the
location of the config. But I would like to because it will help me at
a later date if I turn this over to someone else.

                        //Register interceptors as an array, we need
order
        interceptors = [
                 //Autowire
                 {class="coldbox.system.interceptors.Autowire"},
                 //SES
                 {class="coldbox.system.interceptors.SES"},
                properties={configFile="config/routes.cfm"}
                  {
                        class="coldbox.system.interceptors.Security",
                                properties={
                                useRoutes = true,
                                rulesSource = "xml",
                                rulesFile = "/config/
securityRules.xml.cfm"
                        }
                 }
        ];

What operating system are you on?

Regards,
Andrew Scott
http://www.andyscott.id.au/

From: coldbox@googlegroups.com [mailto:coldbox@googlegroups.com] On
Behalf Of murphyhg
Sent: Friday, 25 February 2011 10:13 AM
To: ColdBox Platform
Subject: [coldbox:8282] Re: Integrating code with Interceptors

I am thinking I should have something like this. But ColdFusion Builder

says

that syntax is wrong. What is the correct syntax to write the code so I

can

declare the location of my config file and security rules file? I know

that by

convention I do not need to declare the location of the config. But I

would

like to because it will help me at a later date if I turn this over to

someone

else.

                        //Register interceptors as an array, we need order
        interceptors = [
                 //Autowire
                 {class="coldbox.system.interceptors.Autowire"},
                 //SES
                 {class="coldbox.system.interceptors.SES"},
                properties={configFile="config/routes.cfm"}
                  {
                        class="coldbox.system.interceptors.Security",
                                properties={
                                useRoutes = true,
                                rulesSource = "xml",
                                rulesFile = "/config/

securityRules.xml.cfm"

Windows 2003 RC2 IIS6 Helicon Rewrite

I just wanted to eliminate that it was not a case issue, but I can see the
problem now.

You need to remove the forward slash /, from the config filename.

Regards,
Andrew Scott
http://www.andyscott.id.au/

Can you please post. I am not sure which one you are talking about?

Well there was only one in your example.

Regards,
Andrew Scott
http://www.andyscott.id.au/

Do you mean I should do this?

                        //Register interceptors as an array, we need
order
        interceptors = [
                 //Autowire
                 {class="coldbox.system.interceptors.Autowire"},
                 //SES
                 {class="coldbox.system.interceptors.SES"},
                properties={configFile="routes.cfm"}
                  {
                        class="coldbox.system.interceptors.Security",
                                properties={
                                useRoutes = true,
                                rulesSource = "xml",
                                rulesFile = "/config/
securityRules.xml.cfm"
                        }
                 }
        ];

No you need to remove the / from

rulesFile = "/config/ securityRules.xml.cfm"

Regards,
Andrew Scott
http://www.andyscott.id.au/

From: coldbox@googlegroups.com [mailto:coldbox@googlegroups.com] On
Behalf Of murphyhg
Sent: Friday, 25 February 2011 1:34 PM
To: ColdBox Platform
Subject: [coldbox:8294] Re: Integrating code with Interceptors

Do you mean I should do this?

                        //Register interceptors as an array, we need order
        interceptors = [
                 //Autowire
                 {class="coldbox.system.interceptors.Autowire"},
                 //SES
                 {class="coldbox.system.interceptors.SES"},
                properties={configFile="routes.cfm"}
                  {
                        class="coldbox.system.interceptors.Security",
                                properties={
                                useRoutes = true,
                                rulesSource = "xml",
                                rulesFile = "/config/

securityRules.xml.cfm"