Top Level Namespace

Defined Under Namespace

Modules: ApplicationHelper, ControllerHelpers, HappySeed Classes: AddRefreshTokenToIdentity, AddSecretTokenToIdentity, AngularController, DevisePreview, FormUser, GoogleAppsClient, Identity, MakeEmailNullable, OmniauthCallbacksController, RegistrationsController, SetupController, SplashController, User

Instance Method Summary collapse

Instance Method Details

#authenticateObject



4
5
6
7
8
9
10
# File 'lib/generators/happy_seed/base/templates/application_controller.rb', line 4

def authenticate
  unless ENV['HTTP_AUTH_USERNAME'].blank? or ENV['HTTP_AUTH_PASSWORD'].blank?
    authenticate_or_request_with_http_basic do |username, password|
      username == ENV['HTTP_AUTH_USERNAME'] && password == ENV['HTTP_AUTH_PASSWORD']
    end
  end
end