Class: ApplicationCable::Connection
- Inherits:
-
ActionCable::Connection::Base
- Object
- ActionCable::Connection::Base
- ApplicationCable::Connection
- Includes:
- Logging, Gitlab::Auth::AuthFinders
- Defined in:
- app/channels/application_cable/connection.rb
Constant Summary
Constants included from Gitlab::Auth::AuthFinders
Gitlab::Auth::AuthFinders::DEPLOY_TOKEN_HEADER, Gitlab::Auth::AuthFinders::HEADER_TOKEN_KEYS, Gitlab::Auth::AuthFinders::JOB_TOKEN_HEADER, Gitlab::Auth::AuthFinders::JOB_TOKEN_PARAM, Gitlab::Auth::AuthFinders::MAX_JOB_TOKEN_SIZE_BYTES, Gitlab::Auth::AuthFinders::PARAM_TOKEN_KEYS, Gitlab::Auth::AuthFinders::PRIVATE_TOKEN_HEADER, Gitlab::Auth::AuthFinders::PRIVATE_TOKEN_PARAM, Gitlab::Auth::AuthFinders::RUNNER_JOB_TOKEN_PARAM, Gitlab::Auth::AuthFinders::RUNNER_TOKEN_PARAM
Instance Attribute Summary collapse
-
#current_organization ⇒ Object
Returns the value of attribute current_organization.
Attributes included from Gitlab::Auth::AuthFinders
Instance Method Summary collapse
Methods included from Gitlab::Auth::AuthFinders
#authentication_token_present?, #cluster_agent_token_from_authorization_token, #deploy_token_from_request, #find_job_from_job_token, #find_runner_from_token, #find_user_from_access_token, #find_user_from_basic_auth_password, #find_user_from_bearer_token, #find_user_from_feed_token, #find_user_from_job_token, #find_user_from_lfs_token, #find_user_from_personal_access_token, #find_user_from_static_object_token, #find_user_from_warden, #find_user_from_web_access_token, path_dependent_feed_token_regex, #validate_and_save_access_token!
Methods included from Gitlab::RackLoadBalancingHelpers
Instance Attribute Details
#current_organization ⇒ Object
Returns the value of attribute current_organization.
8 9 10 |
# File 'app/channels/application_cable/connection.rb', line 8 def current_organization @current_organization end |
Instance Method Details
#connect ⇒ Object
14 15 16 17 18 19 |
# File 'app/channels/application_cable/connection.rb', line 14 def connect self.current_user = find_user_from_bearer_token || find_user_from_session_store self.current_organization = find_current_organization rescue Gitlab::Auth::AuthenticationError end |