Skip to content

Commit

Permalink
Merge pull request #156 from etalab/change_fc_token
Browse files Browse the repository at this point in the history
fake user token for staging
  • Loading branch information
JeSuisUnCaillou authored Nov 18, 2024
2 parents 1b66717 + 9350e00 commit 36e60a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/api_particulier/quotient_familial/v2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module QuotientFamilial
class V2 < Base
def initialize(access_token:, siret:)
@access_token = access_token
fake_user_token_for_staging
@siret = siret
end

Expand All @@ -21,6 +22,10 @@ def query_params
def add_authentication_headers(request)
request["Authorization"] = "Bearer #{@access_token}"
end

def fake_user_token_for_staging
@access_token = "cnaf_qfv2" unless Rails.env.production?
end
end
end
end

0 comments on commit 36e60a6

Please sign in to comment.