File: mtls.rb

package info (click to toggle)
ruby-rack-oauth2 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 564 kB
  • sloc: ruby: 4,038; makefile: 4
file content (16 lines) | stat: -rw-r--r-- 361 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Rack
  module OAuth2
    class AccessToken
      class MTLS < Bearer
        attr_required :private_key, :certificate

        def initialize(attributes = {})
          super
          self.token_type = :bearer
          http_client.ssl.client_key = private_key
          http_client.ssl.client_cert = certificate
        end
      end
    end
  end
end