Class: Aviate::ConfigurationController
Instance Method Summary
collapse
#as_string, #aviate_authentication, #current_tenant_user, #external_paginate, #layout, #log_rescue_error
Instance Method Details
#session_create ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'app/controllers/aviate/configuration_controller.rb', line 10
def session_create
cached_options_for_klient = options_for_klient
email = params[:aviate_email]
password = params[:aviate_password]
response = Killbill::Aviate::AviateClient.authenticate(email, password, cached_options_for_klient)
if response['token']
cookies.encrypted[:jwt_token] = {
value: response['token'],
httponly: true,
secure: Rails.env.production?,
same_site: :strict,
expires: 1.hour.from_now
}
end
redirect_to aviate_root_path
end
|