Sha256: bcc38d5e5d5b4b77df03cf41fa20a5ff9ca5a53c8bc151ab6e604b187494ef61

Contents?: true

Size: 708 Bytes

Versions: 5

Compression:

Stored size: 708 Bytes

Contents

# frozen_string_literal: true

module OmniAuth
  module DoximityOauth2
    # Error for failed request to get public keys, for JWK verification
    class JWKSRequestError < StandardError
      MESSAGE = "Failed to request public keys for user info verification"
      attr_reader :url, :response

      def initialize(url, response)
        @url = url
        @response = response
        super(MESSAGE)
      end
    end

    # Error for failed JWK verifications
    class JWTVerificationError < StandardError
      MESSAGE = "Failed to verify user info JWT"
      attr_reader :token, :error

      def initialize(error, token)
        @token = token
        super(error.message)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
omniauth-doximity-oauth2-1.5.0 lib/omniauth-doximity-oauth2/errors.rb
omniauth-doximity-oauth2-1.4.0 lib/omniauth-doximity-oauth2/errors.rb
omniauth-doximity-oauth2-1.3.0 lib/omniauth-doximity-oauth2/errors.rb
omniauth-doximity-oauth2-1.2.0 lib/omniauth-doximity-oauth2/errors.rb
omniauth-doximity-oauth2-1.2.0.pre.3 lib/omniauth-doximity-oauth2/errors.rb