Sha256: 71cd466a307382b7e0d108771d5c7ae0a03eb049a6dfaac9bd12be608e6e7898

Contents?: true

Size: 434 Bytes

Versions: 8

Compression:

Stored size: 434 Bytes

Contents

module Rack
  module OAuth2
    class AccessToken
      class Bearer < AccessToken
        def authenticate(request)
          request.headers["Authorization"] = "Bearer #{access_token}"
        end

        def to_mtls(attributes = {})
          (required_attributes + optional_attributes).each do |key|
            attributes[key] = self.send(key)
          end
          MTLS.new attributes
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rack-oauth2-2.2.1 lib/rack/oauth2/access_token/bearer.rb
rack-oauth2-2.2.0 lib/rack/oauth2/access_token/bearer.rb
rack-oauth2-2.1.0 lib/rack/oauth2/access_token/bearer.rb
rack-oauth2-2.0.1 lib/rack/oauth2/access_token/bearer.rb
rack-oauth2-2.0.0 lib/rack/oauth2/access_token/bearer.rb
rack-oauth2-2.0.0.rc3 lib/rack/oauth2/access_token/bearer.rb
rack-oauth2-2.0.0.rc2 lib/rack/oauth2/access_token/bearer.rb
rack-oauth2-2.0.0.rc1 lib/rack/oauth2/access_token/bearer.rb