Sha256: f38cec74a5f115b9212f7072b6533fab87a976c9a2303cdb1732cbb03dd6c8ea

Contents?: true

Size: 1.02 KB

Versions: 53

Compression:

Stored size: 1.02 KB

Contents

module GroupDocs
  module Api
    module Helpers
      module Credentials

        private

        #
        # Returns client ID from access hash or GroupDocs class variable.
        #
        # @return [String]
        # @raise [NoClientIdError] If Client ID hasn't been set yet, raise exception.
        # @api private
        #
        def client_id
          client_id = options[:access][:client_id] || GroupDocs.client_id
          client_id or raise NoClientIdError, 'Client ID has not been specified.'
        end

        #
        # Returns private key from access hash or GroupDocs class variable.
        #
        # @return [String]
        # @raise [NoPrivateKeyError] If private key hasn't been set yet, raise exception.
        # @api private
        #
        def private_key
          private_key = options[:access][:private_key] || GroupDocs.private_key
          private_key or raise NoPrivateKeyError, 'Private Key has not been specified.'
        end

      end # Credentials
    end # Helpers
  end # Api
end # GroupDocs

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
groupdocs-2.2.0 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-2.1.0 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-2.0.0 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.9.0 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.8.1 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.8.0 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.7.0 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.6.0 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.5.9 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.5.8 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.5.7 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.5.6 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.5.5 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.5.4 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.5.3 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.5.2 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.5.1 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.5.0 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.4.2 lib/groupdocs/api/helpers/credentials_helper.rb
groupdocs-1.4.1 lib/groupdocs/api/helpers/credentials_helper.rb