Sha256: d227256ddbbbb8151bc665084d69cee6a6c0b1410dc6a6384724c3482fefd070

Contents?: true

Size: 789 Bytes

Versions: 8

Compression:

Stored size: 789 Bytes

Contents

# frozen_string_literal: true

module GraphqlDevise
  module Types
    class CredentialType < BaseType
      field :access_token, String, null: false
      field :uid,          String, null: false
      field :token_type,   String, null: false
      field :client,       String, null: false
      field :expiry,       Int,    null: false

      def access_token
        object[DeviseTokenAuth.headers_names[:"access-token"]]
      end

      def uid
        object[DeviseTokenAuth.headers_names[:uid]]
      end

      def token_type
        object[DeviseTokenAuth.headers_names[:"token-type"]]
      end

      def client
        object[DeviseTokenAuth.headers_names[:client]]
      end

      def expiry
        object[DeviseTokenAuth.headers_names[:expiry]]
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
graphql_devise-2.0.0 lib/graphql_devise/types/credential_type.rb
graphql_devise-1.4.0 lib/graphql_devise/types/credential_type.rb
graphql_devise-1.3.0 lib/graphql_devise/types/credential_type.rb
graphql_devise-1.2.0 lib/graphql_devise/types/credential_type.rb
graphql_devise-1.1.1 lib/graphql_devise/types/credential_type.rb
graphql_devise-1.1.0 lib/graphql_devise/types/credential_type.rb
graphql_devise-1.0.1 lib/graphql_devise/types/credential_type.rb
graphql_devise-1.0.0 lib/graphql_devise/types/credential_type.rb