@@ -247,7 +247,7 @@ component accessors="true" singleton {
247
247
248
248
// Verify it
249
249
if ( isNull ( oUser ) || ! len ( oUser .getId () ) ) {
250
- // Announce the creation
250
+ // Announce the invalid user
251
251
variables .interceptorService .processState (
252
252
" cbSecurity_onJWTInvalidUser" ,
253
253
{
@@ -270,7 +270,7 @@ component accessors="true" singleton {
270
270
.getContext ()
271
271
.setPrivateValue ( variables .settings .prcUserVariable , oUser );
272
272
273
- // Announce the creation
273
+ // Announce the valid authentication
274
274
variables .interceptorService .processState (
275
275
" cbSecurity_onJWTValidAuthentication" ,
276
276
{
@@ -297,7 +297,7 @@ component accessors="true" singleton {
297
297
// Invalidate the token, decode it first and use the jti claim
298
298
var results = getTokenStorage ().clear ( this .decode ( arguments .token ).jti );
299
299
300
- // Announce the creation
300
+ // Announce the token invalidation
301
301
variables .interceptorService .processState (
302
302
" cbSecurity_onJWTInvalidation" ,
303
303
{ token : arguments .token }
@@ -364,7 +364,7 @@ component accessors="true" singleton {
364
364
);
365
365
}
366
366
367
- // Announce the creation
367
+ // Announce the invalid claims
368
368
variables .interceptorService .processState (
369
369
" cbSecurity_onJWTInvalidClaims" ,
370
370
{
@@ -387,7 +387,7 @@ component accessors="true" singleton {
387
387
variables .log .warn ( " Token rejected, it has expired" , decodedToken );
388
388
}
389
389
390
- // Announce the creation
390
+ // Announce the token expiration
391
391
variables .interceptorService .processState (
392
392
" cbSecurity_onJWTExpiration" ,
393
393
{
@@ -400,12 +400,12 @@ component accessors="true" singleton {
400
400
}
401
401
402
402
// Verify that this token has not been invalidated in the storage?
403
- if ( ! getTokenStorage ().exists ( decodedToken .jti ) ) {
403
+ if ( variables . settings . jwt . tokenStorage . enabled && ! getTokenStorage ().exists ( decodedToken .jti ) ) {
404
404
if ( variables .log .canWarn () ) {
405
405
variables .log .warn ( " Token rejected, it was not found in token storage" , decodedToken );
406
406
}
407
407
408
- // Announce the creation
408
+ // Announce the rejection, token not found in storage
409
409
variables .interceptorService .processState (
410
410
" cbSecurity_onJWTStorageRejection" ,
411
411
{
@@ -424,7 +424,7 @@ component accessors="true" singleton {
424
424
// Log
425
425
if ( variables .log .canDebug () ) {
426
426
variables .log .debug (
427
- " Token is valid, not expired and found in storage, inflating to PRC" ,
427
+ " Token is valid, not expired and found in (enabled) storage, inflating to PRC" ,
428
428
decodedToken
429
429
);
430
430
}
@@ -435,7 +435,7 @@ component accessors="true" singleton {
435
435
.setPrivateValue ( " jwt_token" , jwtToken )
436
436
.setPrivateValue ( " jwt_payload" , decodedToken );
437
437
438
- // Announce the creation
438
+ // Announce the valid parsing
439
439
variables .interceptorService .processState (
440
440
" cbSecurity_onJWTValidParsing" ,
441
441
{
@@ -581,7 +581,7 @@ component accessors="true" singleton {
581
581
* @return { allow:boolean, type:authentication|authorization }
582
582
*/
583
583
struct function ruleValidator ( required rule , required controller ){
584
- return validateSecurity ( arguments .rule .roles );
584
+ return validateSecurity ( arguments .rule .permissions );
585
585
}
586
586
587
587
/**
0 commit comments