cbSecurity
CommunitySlackSupport
v2.x
v2.x
  • Introduction
  • Intro
    • Release History
      • What's New With 2.15.0
      • What's New With 2.14.0
      • What's New With 2.13.0
      • What's New With 2.12.0
      • What's New With 2.11.x
      • What's New With 2.10.0
      • What's New With 2.9.0
      • What's New With 2.8.0
      • What's New With 2.7.0
      • What's New With 2.6.0
      • What's New With 2.5.0
      • What's New With 2.4.0
      • What's New With 2.3.0
      • What's New With 2.2.0
      • What's New With 2.1.0
      • What's New With 2.0.0
    • About This Book
    • Author
  • Getting Started
    • Installation
    • Overview
    • Configuration
      • Rule Sources
        • DB Rules
        • Inline Rules
        • JSON Rules
        • Model Rules
        • Module Rules
        • XML Rules
  • Usage
    • Authentication Services
    • Security Rules
    • Security Annotations
    • Secured URL
    • Interceptions
    • cbSecurity Model
      • secure() Blocking Methods
      • Verification Methods
      • Authorization Contexts
      • Securing Views
    • Cross Site Request Forgery
  • Security Validators
    • CBAuth Validator
    • CFML Security Validator
    • Custom Validator
  • JWT
    • JWT Services
    • JWT Validator
    • Refresh Tokens
    • Token Storage
    • JWT Interceptions
  • External links
    • Source code
    • Issue Tracker
    • cbauth
    • cbcsrf
    • JWT CFML
Powered by GitBook
On this page

Was this helpful?

Edit on Git
Export as PDF
  1. Usage

Secured URL

_securedURL

The security module has the concept of a secured URL which is the actual URL that got intercepted and relocated because of a security exception. If the module detects an invalid authentication or authorization and an action must be issued, then the firewall will store this URL in the RC scope and flash it so it can be available in the next request (if a relocation occurs).

The flash RAM variable is called: _securedURL. This key will be persisted in the flash memory of the framework and when the user gets relocated to the redirect element, this key will be populated in the request collection automatically for you.

So always remember to use this key if you want to provide a seamless login experience to your users. You can easily place it in the login form:

#html.startForm(action=prc.xehDoLogin,name="loginForm")#

    #html.hiddenField(name="_securedURL",value=event.getValue('_securedURL',''))#

    #html.textfield(name="username",label="Username: ",size="40",required="required",class="textfield",value=prc.rememberMe)#
    #html.passwordField(name="password",label="Password: ",size="40",required="required",class="textfield")#

    <div id="loginButtonbar">
        #html.checkBox(name="rememberMe",value=true,checked=(len(prc.rememberMe)))# 
        #html.label(field="rememberMe",content="Remember Me  ",class="inline")#
        #html.submitButton(value="  Log In  ",class="buttonred")#
    </div>

    <br/>
    <img src="#prc.cbRoot#/includes/images/lock.png" alt="lostPassword" />
    <a href="#event.buildLink(prc.xehLostPassword)#">Lost your password?</a> 

#html.endForm()#
PreviousSecurity AnnotationsNextInterceptions

Last updated 3 years ago

Was this helpful?