simple-jwt-authentication icon indicating copy to clipboard operation
simple-jwt-authentication copied to clipboard

Use revoke as logout

Open tom-cichy-cityos opened this issue 5 years ago • 0 comments

Can we please add filter support for the revoke function, ie:

if ( $tokens ) { foreach ( $tokens as $key => $token_data ) { if ( $token_data['uuid'] === $token_uuid ) { unset( $tokens[ $key ] ); update_user_meta( $token->data->user->id, 'jwt_data', $tokens ); **apply_filters( 'jwt_auth_token_revoke', $token );** return array( 'code' => 'jwt_auth_revoked_token', 'data' => array( 'status' => 200, ), ); } } }

or simple "apply_filters( 'jwt_auth_token_revoke', $token );" in "class-simple-jwt-authentication-rest.php"

tom-cichy-cityos avatar Mar 11 '20 08:03 tom-cichy-cityos