Sha256: 65f9a0525d754848b4256d37dd35c0af809263ef60a6a70b9b52cf9523724d99

Contents?: true

Size: 810 Bytes

Versions: 22

Compression:

Stored size: 810 Bytes

Contents

# frozen_string_literal: true

shared_context "with token hashing enabled" do
  let(:hashed_or_plain_token_func) do
    Doorkeeper::SecretStoring::Sha256Hash.method(:transform_secret)
  end

  before do
    Doorkeeper.configure do
      hash_token_secrets
    end
  end
end

shared_context "with token hashing and fallback lookup enabled" do
  let(:hashed_or_plain_token_func) do
    Doorkeeper::SecretStoring::Sha256Hash.method(:transform_secret)
  end

  before do
    Doorkeeper.configure do
      hash_token_secrets fallback: :plain
    end
  end
end

shared_context "with application hashing enabled" do
  let(:hashed_or_plain_token_func) do
    Doorkeeper::SecretStoring::Sha256Hash.method(:transform_secret)
  end
  before do
    Doorkeeper.configure do
      hash_application_secrets
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
doorkeeper-5.1.2 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.2.6 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.3.3 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.1.1 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.2.5 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.3.2 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.4.0.rc1 spec/support/shared/hashing_shared_context.rb
doorkeeper-mongodb-5.2.1 spec/support/shared/hashing_shared_context.rb
doorkeeper-mongodb-5.2.0 spec/support/shared/hashing_shared_context.rb
doorkeeper-sequel-2.2.0 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.2.4 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.3.1 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.3.0 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.2.3 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.2.2 spec/support/shared/hashing_shared_context.rb
doorkeeper-sequel-2.1.0 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.2.1 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.2.0 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.2.0.rc3 spec/support/shared/hashing_shared_context.rb
doorkeeper-5.2.0.rc2 spec/support/shared/hashing_shared_context.rb