Sha256: 750d348361dc87eed6cb1638baf288d0e8618688d254814207fd3095713b1f89

Contents?: true

Size: 1.12 KB

Versions: 31

Compression:

Stored size: 1.12 KB

Contents

module GoogleAuthenticatorRails
  module Session
    # This is where the heart of the session control logic works.  
    # GoogleAuthenticatorRails works in the same way as Authlogic.  It assumes that you've created a class based on
    # GoogleAuthenticatorRails::Session::Base with the name of the model you want to authenticate + "MfaSession". So if you had
    #     
    #     class User < ActiveRecord::Base
    #     end
    # 
    # Your Session management class would look like
    # 
    #     class UserMfaSession < GoogleAuthenticatorRails::Session::Base
    #     end
    # 
    # The Session class gets the name of the record to lookup from the name of the class.
    # 
    # To create a new session based off our User class, you just call
    # 
    #     UserMfaSession.create(@user) # => <# UserMfaSession @record="<# User >">
    # 
    # Then, in your controller, you can lookup that session by calling
    # 
    #     UserMfaSession.find
    # 
    # You don't have to pass any arguments because only one session can be active at a time.
    # 
    class Base
      include Activation
      include Persistence
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
google-authenticator-rails-3.4.3 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-3.4.2 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-3.4.1 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-3.4.0 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-3.3.1 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-3.3.0 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-3.2.1 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-3.2.0 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-3.1.0 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-3.0.0 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-1.7.0 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-2.0.0 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-1.5.1 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-1.6.1 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-1.6.0 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-1.5.0 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-1.4.1 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-1.4.0 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-1.3.0 lib/google-authenticator-rails/session/base.rb
google-authenticator-rails-1.2.1 lib/google-authenticator-rails/session/base.rb