File: unsupported.rb

package info (click to toggle)
ruby-jwt 3.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 876 kB
  • sloc: ruby: 5,550; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 403 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

module JWT
  module JWA
    # Represents an unsupported algorithm
    module Unsupported
      class << self
        include JWT::JWA::SigningAlgorithm

        def sign(*)
          raise_sign_error!('Unsupported signing method')
        end

        def verify(*)
          raise JWT::VerificationError, 'Algorithm not supported'
        end
      end
    end
  end
end