cbSecurity
CommunitySlackSupport
v1.x
v1.x
  • Introduction
  • Overview
  • How It Works
  • Declaring the Interceptor
    • XML Properties
    • JSON Properties
    • DB Properties
    • IOC Properties
    • OCM Properties
  • Security Rules
    • Sample JSON Rules
    • Sample XML Rules
  • _securedURL key
  • Default Security
  • Custom Security Validator Object
Powered by GitBook
On this page

Was this helpful?

Edit on Git
Export as PDF

Default Security

Previous_securedURL keyNextCustom Security Validator Object

Last updated 6 years ago

Was this helpful?

This module will try to use ColdFusion's cflogin + cfloginuserauthentication by default. However, if you are using your own authentication mechanisms you can still use this module by implementing a Security Validator Object (See next section). Below we can see a sample on how to use the cflogin tag:

Example:

<cflogin>
    
    Your login logic here
    
    <---  Log in the user with appropriate credentials --->
    <cfloginuser name="name" password="password" roles="ROLES HERE">
</cflogin>

<---  Some Real sample --->
<cflogin>
    <cfif getUserService().authenticate(rc.username,rc.password)>
        <cfloginuser name="#rc.username#" password="#rc.password#" roles="#getUserService().getRoles(rc.username)#" />
    </cfif>
</cflogin>

For more information about cflogin, cfloginuser and cflogout, please visit the docs

http://cfdocs.org/security-functions