Sha256: 82b2402c215b35cb22cc7e4b9bd5d4cb0f54a5de3d02719878b5150baac5f3cc

Contents?: true

Size: 1.17 KB

Versions: 3

Compression:

Stored size: 1.17 KB

Contents

# frozen_string_literal: true

class AutomaticAuthenticationController < ApplicationController

  def o_auth
    render json: {
      record: DummyRecordWithOauth.find(1).as_json,
      records: DummyRecordWithOauth.where(color: 'blue').as_json
    }
  end

  def o_auth_with_multiple_providers
    render json: {
      record: DummyRecordWithMultipleOauthProviders1.find(1).as_json,
      records: DummyRecordWithMultipleOauthProviders2.where(color: 'blue').as_json,
      per_endpoint: {
        record: DummyRecordWithMultipleOauthProvidersPerEndpoint.find(1).as_json,
        records: DummyRecordWithMultipleOauthProvidersPerEndpoint.where(color: 'blue').as_json
      }
    }
  end

  def o_auth_with_provider
    render json: {
      record: DummyRecordWithAutoOauthProvider.find(1).as_json,
      records: DummyRecordWithAutoOauthProvider.where(color: 'blue').as_json
    }
  end

  def o_auth_with_provider_override
    render json: {
      record: DummyRecordWithAutoOauthProvider.options(auth: { bearer: params[:access_token] }).find(1).as_json,
      records: DummyRecordWithAutoOauthProvider.options(auth: { bearer: params[:access_token] }).where(color: 'blue').as_json
    }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lhs-26.2.0 spec/dummy/app/controllers/automatic_authentication_controller.rb
lhs-26.1.0 spec/dummy/app/controllers/automatic_authentication_controller.rb
lhs-26.0.1 spec/dummy/app/controllers/automatic_authentication_controller.rb