Sha256: 915ca9b309a69087463c3cfc8d0282de1e202d9b7ed3b9ba9e30971659ed0bb1

Contents?: true

Size: 500 Bytes

Versions: 3

Compression:

Stored size: 500 Bytes

Contents

# frozen_string_literal: true

module ApiWarden
  class Authentication
    class HeaderParams < Params

      def headers
        request.headers
      end

      def retrieve_id
        @id ||= headers["X-#{scope.name.camelize}-Id"]
      end

      def retrieve_access_token
        @access_token ||= headers["X-#{scope.name.camelize}-Access-Token"]
      end

      def retrieve_refresh_token
        @refresh_token ||= headers["X-#{scope.name.camelize}-Refresh-Token"]
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
api_warden-0.3.0 lib/api_warden/authentication/header_params.rb
api_warden-0.2.0 lib/api_warden/authentication/header_params.rb
api_warden-0.1.0 lib/api_warden/authentication/header_params.rb