Exception: MCP::Server::OAuth::InvalidTokenError

Inherits:
Error
  • Object
show all
Defined in:
lib/mcp/server/oauth/errors.rb

Overview

The access token is missing, expired, revoked, or otherwise invalid. Maps to HTTP 401. TokenVerifier implementations raise this to reject a token.

Direct Known Subclasses

MissingTokenError

Instance Attribute Summary

Attributes inherited from Error

#error_code

Instance Method Summary collapse

Constructor Details

#initialize(message = "The access token is invalid") ⇒ InvalidTokenError

Returns a new instance of InvalidTokenError.



32
33
34
# File 'lib/mcp/server/oauth/errors.rb', line 32

def initialize(message = "The access token is invalid")
  super(message, error_code: "invalid_token")
end