Sha256: 39c9c5211a14ec9367a2979c89198e4a468bd111ff3b238960640c4f2628bdf7

Contents?: true

Size: 483 Bytes

Versions: 2

Compression:

Stored size: 483 Bytes

Contents

RSpec.shared_context "set_authorization" do

  let(:organization_id) { SecureRandom.uuid }

  let(:payload) do
    {
      iss: "DocShell",
      iat: DateTime.now.to_i,
      jti: SecureRandom.uuid,
      exp: (DateTime.now + 1.year).to_i,
      account: {
        id: SecureRandom.uuid,
        email: Faker::Internet.email,
      },
      permissions: { organization_id  => permissions }
    }
  end
  let(:Authorization) { "Bearer #{Care::JwtService.new.encode(payload)}" }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
care-0.1.1 lib/care/support/authorization_helper.rb
care-0.1.0 lib/care/support/authorization_helper.rb