lib/jwt_keeper/controller.rb in jwt_keeper-5.0.1 vs lib/jwt_keeper/controller.rb in jwt_keeper-6.0.0

- old
+ new

@@ -8,11 +8,11 @@ def require_authentication token = read_authentication_token if token.nil? clear_authentication_token - return not_authenticated + raise JWTKeeper::NotAuthenticatedError end if token.version_mismatch? || token.pending? new_claims = regenerate_claims(token) token.rotate(new_claims) @@ -47,16 +47,9 @@ # @return [void] def clear_authentication_token response.headers['Authorization'] = nil defined?(cookies) && cookies.delete('jwt_keeper') @authentication_token = nil - end - - # The default action for denying non-authenticated connections. - # You can override this method in your controllers - # @return [void] - def not_authenticated - redirect_to root_path end # The default action for accepting authenticated connections. # You can override this method in your controllers # @return [void]