Module: SwaggerUiEngine2::AuthConfigParser

Included in:
ApplicationController
Defined in:
app/helpers/swagger_ui_engine_2/auth_config_parser.rb

Instance Method Summary collapse

Instance Method Details

#admin_passwordObject



7
8
9
# File 'app/helpers/swagger_ui_engine_2/auth_config_parser.rb', line 7

def admin_password
  configuration.admin_password
end

#admin_usernameObject



3
4
5
# File 'app/helpers/swagger_ui_engine_2/auth_config_parser.rb', line 3

def admin_username
  configuration.admin_username
end

#basic_authentication_enabled?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/helpers/swagger_ui_engine_2/auth_config_parser.rb', line 11

def basic_authentication_enabled?
  admin_username && admin_password
end

#configurationObject



15
16
17
# File 'app/helpers/swagger_ui_engine_2/auth_config_parser.rb', line 15

def configuration
  SwaggerUiEngine2.configuration
end