Sha256: 0911f2ca7876fa31b0905f86225fc1ccbd061e43af3ef6d0c7bd223557e4b4ae

Contents?: true

Size: 628 Bytes

Versions: 8

Compression:

Stored size: 628 Bytes

Contents

# frozen_string_literal: true

module Lt
  module Google
    module Api
      module Auth
        module Credentials
          extend ActiveSupport::Concern

          attr_reader :google_credentials

          def obtain_google_credentials(options = {})
            @google_auth_options = options
            @google_credentials = service.credentials

            redirect_to service.authorization_url unless @google_credentials
          end

          private

          def service
            @service ||= Lt::Google::Api::Auth::Service.new(self, @google_auth_options)
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lt-google-api-0.3.0 lib/lt/google/api/auth/credentials.rb
lt-google-api-0.2.4 lib/lt/google/api/auth/credentials.rb
lt-google-api-0.2.3 lib/lt/google/api/auth/credentials.rb
lt-google-api-0.2.2 lib/lt/google/api/auth/credentials.rb
lt-google-api-0.2.1 lib/lt/google/api/auth/credentials.rb
lt-google-api-0.2.0 lib/lt/google/api/auth/credentials.rb
lt-google-api-0.1.1 lib/lt/google/api/auth/credentials.rb
lt-google-api-0.1.0 lib/lt/google/api/auth/credentials.rb