mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 21:54:48 +02:00
added secret key
This commit is contained in:
parent
8a1967bdb9
commit
17850b53d7
2 changed files with 5 additions and 5 deletions
|
@ -4,7 +4,7 @@ module Repp
|
|||
class AccreditationResultsController < ActionController::API
|
||||
before_action :authenticate_shared_key
|
||||
|
||||
TEMPARY_SECRET_KEY = 'tempary-secret-key'.freeze
|
||||
TEMPORARY_SECRET_KEY = 'temporary-secret-key'.freeze
|
||||
|
||||
api :POST, 'repp/v1/registrar/accreditation/push_results'
|
||||
desc 'added datetime results'
|
||||
|
@ -35,7 +35,7 @@ module Repp
|
|||
end
|
||||
|
||||
def authenticate_shared_key
|
||||
api_key = "Basic #{TEMPARY_SECRET_KEY}"
|
||||
api_key = "Basic #{TEMPORARY_SECRET_KEY}"
|
||||
render_failed unless api_key == request.authorization
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue