Exception: Keycardai::OAuth::ProtocolError

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

Overview

The server's response violates the protocol contract: metadata with a mismatched or missing issuer, a token response with no access token. The code discriminates the case (issuer_mismatch, invalid_metadata, invalid_response).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code:) ⇒ ProtocolError

Returns a new instance of ProtocolError.



57
58
59
60
# File 'lib/keycardai/oauth/errors.rb', line 57

def initialize(message, code:)
  super(message)
  @code = code
end

Instance Attribute Details

#codeString (readonly)

Returns:

  • (String)


55
56
57
# File 'lib/keycardai/oauth/errors.rb', line 55

def code
  @code
end