Exception: AtprotoAuth::InvalidAuthorizationServer

Inherits:
OAuthError
  • Object
show all
Defined in:
lib/atproto_auth/errors.rb

Overview

Error raised when authorization server metadata is invalid or cannot be retrieved. This includes issues with server metadata fetching, parsing, or validation against the AT Protocol OAuth requirements.

Examples:

Handling authorization server errors

begin
  server = AtprotoAuth::AuthorizationServer.new(issuer: "https://auth.example.com")
rescue AtprotoAuth::InvalidAuthorizationServer => e
  puts "Failed to validate authorization server: #{e.message}"
end

Instance Attribute Summary

Attributes inherited from OAuthError

#error_code

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ InvalidAuthorizationServer

Returns a new instance of InvalidAuthorizationServer.



43
44
45
# File 'lib/atproto_auth/errors.rb', line 43

def initialize(message)
  super(message, "invalid_authorization_server")
end