Sha256: d75a42a0b1ee834d5ddf4045f0a6079194e6ff1887e4b6fd07714288baf067e5

Contents?: true

Size: 1 KB

Versions: 1

Compression:

Stored size: 1 KB

Contents

# frozen_string_literal: true

module Doorkeeper
  module OpenidConnect
    module Errors
      class OpenidConnectError < StandardError
        def type
          self.class.name.demodulize.underscore.to_sym
        end
      end

      # internal errors
      class InvalidConfiguration < OpenidConnectError; end
      class MissingConfiguration < OpenidConnectError
        def initialize
          super('Configuration for Doorkeeper OpenID Connect missing. Do you have doorkeeper_openid_connect initializer?')
        end
      end

      # OAuth 2.0 errors
      # https://tools.ietf.org/html/rfc6749#section-4.1.2.1
      class InvalidRequest < OpenidConnectError; end

      # OpenID Connect 1.0 errors
      # http://openid.net/specs/openid-connect-core-1_0.html#AuthError
      class LoginRequired < OpenidConnectError; end
      class ConsentRequired < OpenidConnectError; end
      class InteractionRequired < OpenidConnectError; end
      class AccountSelectionRequired < OpenidConnectError; end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
doorkeeper-openid_connect-1.7.2 lib/doorkeeper/openid_connect/errors.rb