Sha256: cd411f07236d1314685d61be10264cf773525b2a43c862c40e9ca9787db81f12

Contents?: true

Size: 536 Bytes

Versions: 5

Compression:

Stored size: 536 Bytes

Contents

# frozen_string_literal: true

require 'graphql'

module Osso
  module GraphQL
    module Types
      class RedirectUri < Types::BaseObject
        description 'An allowed redirect URI for an OauthClient'
        implements ::GraphQL::Types::Relay::Node

        global_id_field :gid
        field :id, ID, null: false
        field :uri, String, null: false
        field :primary, Boolean, null: false

        def self.authorized?(object, context)
          super && context[:scope] == :admin
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
osso-0.0.3.16 lib/osso/graphql/types/redirect_uri.rb
osso-0.0.3.15 lib/osso/graphql/types/redirect_uri.rb
osso-0.0.3.14 lib/osso/graphql/types/redirect_uri.rb
osso-0.0.3.13 lib/osso/graphql/types/redirect_uri.rb
osso-0.0.3.12 lib/osso/graphql/types/redirect_uri.rb