Class: Api::Aoa::V1::AuthenticationController
Constant Summary
BaseController::CACHE_NAMESPACE
Instance Method Summary
collapse
#decrypt, #encrypt, #generate_signature
#identity_cache_memoization
#append_info_to_payload
#my_response_cache
Instance Method Details
#create ⇒ Object
7
8
9
10
|
# File 'app/controllers/api/aoa/v1/authentication_controller.rb', line 7
def create
::Aoa::AuthCreationWorker.perform_async(permitted_params.to_h)
render_json(encrypt(permitted_params[:contact_id].to_s), :ok, 'token')
end
|
#render_json(data, status_code, main_key) ⇒ Object
16
17
18
|
# File 'app/controllers/api/aoa/v1/authentication_controller.rb', line 16
def render_json(data, status_code, main_key)
render json: { data: { "#{main_key}": data }, success: status_code == :ok }, status: status_code
end
|
#reservation_data ⇒ Object
12
13
14
|
# File 'app/controllers/api/aoa/v1/authentication_controller.rb', line 12
def reservation_data
render json: { data: @data, success: true }, status: :ok
end
|