Skip to content

Commit 7c07d69

Browse files
committed
Ensure SecurityValidator docs all match
1 parent 80038de commit 7c07d69

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

interfaces/ISecurityValidator.cfc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ interface{
1010
* This function is called once an incoming event matches a security rule.
1111
* You will receive the security rule that matched and an instance of the ColdBox controller.
1212
*
13-
* You must return a struct with two keys:
13+
* You must return a struct with three keys:
1414
* - allow:boolean True, user can continue access, false, invalid access actions will ensue
1515
* - type:string(authentication|authorization) The type of block that ocurred. Either an authentication or an authorization issue.
16+
* - messages:string Info/debug messages
1617
*
1718
* @return { allow:boolean, type:string(authentication|authorization), messages:string }
1819
*/
@@ -22,9 +23,10 @@ interface{
2223
* This function is called once access to a handler/action is detected.
2324
* You will receive the secured annotation value and an instance of the ColdBox Controller
2425
*
25-
* You must return a struct with two keys:
26+
* You must return a struct with three keys:
2627
* - allow:boolean True, user can continue access, false, invalid access actions will ensue
2728
* - type:string(authentication|authorization) The type of block that ocurred. Either an authentication or an authorization issue.
29+
* - messages:string Info/debug messages
2830
*
2931
* @return { allow:boolean, type:string(authentication|authorization), messages:string }
3032
*/

models/validators/CBAuthValidator.cfc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ component singleton {
1515
* You will receive the security rule that matched and an instance of the
1616
* ColdBox controller.
1717
*
18-
* You must return a struct with two keys:
18+
* You must return a struct with three keys:
1919
* - allow:boolean True, user can continue access, false, invalid access actions will ensue
2020
* - type:string(authentication|authorization) The type of block that ocurred. Either an authentication or an authorization issue.
2121
* - messages:string Info/debug messages
2222
*
23-
* @return { allow:boolean, type:authentication|authorization, messages:string }
23+
* @return { allow:boolean, type:string(authentication|authorization), messages:string }
2424
*/
2525
struct function ruleValidator( required rule, required controller ){
2626
return validateSecurity( arguments.rule.permissions );
@@ -30,12 +30,12 @@ component singleton {
3030
* This function is called once access to a handler/action is detected.
3131
* You will receive the secured annotation value and an instance of the ColdBox Controller
3232
*
33-
* You must return a struct with two keys:
33+
* You must return a struct with three keys:
3434
* - allow:boolean True, user can continue access, false, invalid access actions will ensue
3535
* - type:string(authentication|authorization) The type of block that ocurred. Either an authentication or an authorization issue.
3636
* - messages:string Info/debug messages
3737
*
38-
* @return { allow:boolean, type:authentication|authorization, messages:string }
38+
* @return { allow:boolean, type:string(authentication|authorization), messages:string }
3939
*/
4040
struct function annotationValidator( required securedValue, required controller ){
4141
return validateSecurity( arguments.securedValue );

models/validators/CFValidator.cfc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ component singleton {
1212
* You will receive the security rule that matched and an instance of the
1313
* ColdBox controller.
1414
*
15-
* You must return a struct with two keys:
15+
* You must return a struct with three keys:
1616
* - allow:boolean True, user can continue access, false, invalid access actions will ensue
1717
* - type:string(authentication|authorization) The type of block that ocurred. Either an authentication or an authorization issue.
1818
* - messages:string Info/debug messages
1919
*
20-
* @return { allow:boolean, type:authentication|authorization, messages:string }
20+
* @return { allow:boolean, type:string(authentication|authorization), messages:string }
2121
*/
2222
struct function ruleValidator( required rule, required controller ){
2323
return validateSecurity( arguments.rule.roles );
@@ -27,12 +27,12 @@ component singleton {
2727
* This function is called once access to a handler/action is detected.
2828
* You will receive the secured annotation value and an instance of the ColdBox Controller
2929
*
30-
* You must return a struct with two keys:
30+
* You must return a struct with three keys:
3131
* - allow:boolean True, user can continue access, false, invalid access actions will ensue
3232
* - type:string(authentication|authorization) The type of block that ocurred. Either an authentication or an authorization issue.
3333
* - messages:string Info/debug messages
3434
*
35-
* @return { allow:boolean, type:authentication|authorization, messages:string }
35+
* @return { allow:boolean, type:string(authentication|authorization), messages:string }
3636
*/
3737
struct function annotationValidator( required securedValue, required controller ){
3838
return validateSecurity( arguments.securedValue );

0 commit comments

Comments
 (0)