Skip to content

Commit

Permalink
[CPDLP-3843] Remove NPQRegistrationApiToken
Browse files Browse the repository at this point in the history
  • Loading branch information
leandroalemao committed Dec 19, 2024
1 parent 431ef8d commit e532d0f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 22 deletions.
13 changes: 0 additions & 13 deletions app/models/npq_registration_api_token.rb

This file was deleted.

4 changes: 0 additions & 4 deletions db/legacy_seeds/dummy_structures.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,11 @@
# The tokens below have different unhashed version to avoid worrying about clever cryptographic attacks
if Rails.env.review?
EngageAndLearnApiToken.find_or_create_by!(hashed_token: "dfce9a34c6f982e8adb4b903f8b6064682e6ad1f7858c41ed8a0a7468abc8896")
NPQRegistrationApiToken.find_or_create_by!(hashed_token: "1dae3836ed90df4b796eff1f4a4713247ac5bc8a00352ea46eee621d74cd4fcf")
DataStudioApiToken.find_or_create_by!(hashed_token: "c7123fb0e2aecb17e1089e01849d71665983e200e891fe726341a08f176c1d64")
elsif Rails.env.development?
EngageAndLearnApiToken.find_or_create_by!(hashed_token: "f4a16cd7fc10918fbc7d869d7a83df36059bb98fac7c82502d797b1f1dd73e86")
end
end
if Rails.env.sandbox?
NPQRegistrationApiToken.find_or_create_by!(hashed_token: "166eaa39950ad15f2f36041cb9062cc8fa9f109945fe9b8378bf904fe35369bc")
end

unless Rails.env.sandbox?
[
Expand Down
5 changes: 1 addition & 4 deletions db/new_seeds/base/add_api_tokens.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@

if Rails.env.in?(%w[review staging])
EngageAndLearnApiToken.find_or_create_by!(hashed_token: "dfce9a34c6f982e8adb4b903f8b6064682e6ad1f7858c41ed8a0a7468abc8896")
NPQRegistrationApiToken.find_or_create_by!(hashed_token: "1dae3836ed90df4b796eff1f4a4713247ac5bc8a00352ea46eee621d74cd4fcf")
DataStudioApiToken.find_or_create_by!(hashed_token: "c7123fb0e2aecb17e1089e01849d71665983e200e891fe726341a08f176c1d64")
elsif Rails.env.development?
EngageAndLearnApiToken.find_or_create_by!(hashed_token: "f4a16cd7fc10918fbc7d869d7a83df36059bb98fac7c82502d797b1f1dd73e86")
end

if Rails.env.sandbox?
NPQRegistrationApiToken.find_or_create_by!(hashed_token: "166eaa39950ad15f2f36041cb9062cc8fa9f109945fe9b8378bf904fe35369bc")
else
unless Rails.env.sandbox?
{
"Ambition Institute" => "ambition-token",
"Best Practice Network" => "best-practice-token",
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/api/v1/data_studio/school_rollout_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
end

context "using a private token from different scope" do
let(:other_private_token) { NPQRegistrationApiToken.create_with_random_token! }
let(:other_private_token) { DataStudioApiToken.create_with_random_token! }

it "returns data successfully" do
default_headers[:Authorization] = "Bearer #{other_private_token}"
Expand Down

0 comments on commit e532d0f

Please sign in to comment.