Skip to content

Commit 3624d73

Browse files
committed
* Updated processState() to announce() to stay compliant
1 parent 8e153a2 commit 3624d73

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

models/jwt/JwtService.cfc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ component accessors="true" singleton threadsafe {
163163
/**
164164
* Logout a user and invalidate their access token
165165
*
166-
* @user
166+
* @user
167167
* @customClaims
168168
*/
169169
function logout(){
@@ -245,7 +245,7 @@ component accessors="true" singleton threadsafe {
245245
// Verify it
246246
if ( isNull( oUser ) || !len( oUser.getId() ) ) {
247247
// Announce the invalid user
248-
variables.interceptorService.processState(
248+
variables.interceptorService.announce(
249249
"cbSecurity_onJWTInvalidUser",
250250
{ payload : arguments.payload }
251251
);
@@ -261,7 +261,7 @@ component accessors="true" singleton threadsafe {
261261
.setPrivateValue( variables.settings.authentication.prcUserVariable, oUser );
262262

263263
// Announce the valid authentication
264-
variables.interceptorService.processState(
264+
variables.interceptorService.announce(
265265
"cbSecurity_onJWTValidAuthentication",
266266
{ payload : arguments.payload, user : oUser }
267267
);
@@ -289,7 +289,7 @@ component accessors="true" singleton threadsafe {
289289
var results = getTokenStorage().clear( this.decode( arguments.token ).jti );
290290

291291
// Announce the token invalidation
292-
variables.interceptorService.processState( "cbSecurity_onJWTInvalidation", { token : arguments.token } );
292+
variables.interceptorService.announce( "cbSecurity_onJWTInvalidation", { token : arguments.token } );
293293

294294
return results;
295295
}
@@ -313,7 +313,7 @@ component accessors="true" singleton threadsafe {
313313
getTokenStorage().clearAll( arguments.async );
314314

315315
// Announce the token invalidation
316-
variables.interceptorService.processState( "cbSecurity_onJWTInvalidateAllTokens" );
316+
variables.interceptorService.announce( "cbSecurity_onJWTInvalidateAllTokens" );
317317

318318
if ( variables.log.canInfo() ) {
319319
variables.log.info( "All tokens cleared via token storage clear all" );
@@ -442,7 +442,7 @@ component accessors="true" singleton threadsafe {
442442
}
443443

444444
// Announce the invalid claims
445-
variables.interceptorService.processState(
445+
variables.interceptorService.announce(
446446
"cbSecurity_onJWTInvalidClaims",
447447
{ token : arguments.token, payload : decodedToken }
448448
);
@@ -463,7 +463,7 @@ component accessors="true" singleton threadsafe {
463463
}
464464

465465
// Announce the token expiration
466-
variables.interceptorService.processState(
466+
variables.interceptorService.announce(
467467
"cbSecurity_onJWTExpiration",
468468
{ token : arguments.token, payload : decodedToken }
469469
);
@@ -478,7 +478,7 @@ component accessors="true" singleton threadsafe {
478478
}
479479

480480
// Announce the rejection, token not found in storage
481-
variables.interceptorService.processState(
481+
variables.interceptorService.announce(
482482
"cbSecurity_onJWTStorageRejection",
483483
{ token : arguments.token, payload : decodedToken }
484484
);
@@ -507,7 +507,7 @@ component accessors="true" singleton threadsafe {
507507
.setPrivateValue( "jwt_payload", decodedToken );
508508

509509
// Announce the valid parsing
510-
variables.interceptorService.processState(
510+
variables.interceptorService.announce(
511511
"cbSecurity_onJWTValidParsing",
512512
{ token : arguments.token, payload : decodedToken }
513513
);
@@ -635,7 +635,7 @@ component accessors="true" singleton threadsafe {
635635
}
636636

637637
// Announce the token expiration
638-
variables.interceptorService.processState( "cbSecurity_onJWTExpiration", { token : arguments.token } );
638+
variables.interceptorService.announce( "cbSecurity_onJWTExpiration", { token : arguments.token } );
639639

640640
throw( type = "TokenExpiredException", message = "Token has expired" );
641641
} catch ( any e ) {
@@ -789,7 +789,7 @@ component accessors="true" singleton threadsafe {
789789
}
790790

791791
// Announce the creation
792-
variables.interceptorService.processState(
792+
variables.interceptorService.announce(
793793
"cbSecurity_onJWTCreation",
794794
{
795795
token : jwtToken,

0 commit comments

Comments
 (0)