|
|
|
@ -5,6 +5,10 @@ class Oauth::BaseController < ActionController::Base
|
|
|
|
|
|
|
|
|
|
skip_before_action :verify_authenticity_token
|
|
|
|
|
|
|
|
|
|
included do
|
|
|
|
|
helper_method :default_yun_session
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def auth_failure
|
|
|
|
|
render_error(params[:message])
|
|
|
|
|
end
|
|
|
|
@ -24,4 +28,9 @@ class Oauth::BaseController < ActionController::Base
|
|
|
|
|
Rails.logger.info("[OAuth2] omniauth.auth -> #{request.env['omniauth.auth'].inspect}")
|
|
|
|
|
request.env['omniauth.auth']
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def default_yun_session
|
|
|
|
|
@_default_yun_session = "#{request.subdomain.split('.').first}_user_id"
|
|
|
|
|
# @_default_yun_session = "#{current_laboratory.try(:identifier).split('.').first}_user_id"
|
|
|
|
|
end
|
|
|
|
|
end
|