Sha256: d606a5327f041ec58c460e5c8aedb83efd73a97ac2c7bec393eb6fa43193a299

Contents?: true

Size: 773 Bytes

Versions: 14

Compression:

Stored size: 773 Bytes

Contents

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

14 entries across 14 versions & 1 rubygems

Version Path
graphql_devise-0.12.3 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.12.2 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.12.1 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.12.0 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.11.4 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.11.3 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.11.2 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.11.1 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.11.0 lib/graphql_devise/types/credential_type.rb
graphql_devise-0.10.1 app/graphql/graphql_devise/types/credential_type.rb
graphql_devise-0.10.0 app/graphql/graphql_devise/types/credential_type.rb
graphql_devise-0.9.2 app/graphql/graphql_devise/types/credential_type.rb
graphql_devise-0.9.1 app/graphql/graphql_devise/types/credential_type.rb
graphql_devise-0.9.0 app/graphql/graphql_devise/types/credential_type.rb