Sha256: ca8923633803892124d285ece56e68b463a350ab021dd907b2c2b21139b5e67a

Contents?: true

Size: 804 Bytes

Versions: 18

Compression:

Stored size: 804 Bytes

Contents

# frozen_string_literal: true

module GraphqlDevise
  module Types
    class CredentialType < GraphQL::Schema::Object
      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

18 entries across 18 versions & 1 rubygems

Version Path
graphql_devise-0.18.2 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.18.1 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.18.0 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.17.1 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.17.0 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.16.0 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.15.0 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.14.3 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.14.2 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.14.1 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.14.0 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.13.6 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.13.5 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.13.4 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.13.3 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.13.2 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.13.1 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.13.0 lib/graphql_devise/types/credential_type.rb