Class: RailsIam::Configuration
- Inherits:
-
Object
- Object
- RailsIam::Configuration
- Defined in:
- lib/rails_iam/configuration.rb
Instance Attribute Summary collapse
-
#audit_performer_method ⇒ Object
Returns the value of attribute audit_performer_method.
-
#authentication ⇒ Object
readonly
Returns the value of attribute authentication.
-
#authorization ⇒ Object
readonly
Returns the value of attribute authorization.
-
#current_user_method ⇒ Object
Returns the value of attribute current_user_method.
-
#jwt ⇒ Object
readonly
Returns the value of attribute jwt.
-
#user_class ⇒ Object
Returns the value of attribute user_class.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rails_iam/configuration.rb', line 9 def initialize # Each concern has its own configuration object to keep the @authorization = RailsIam::Config::Authorization.new @jwt = RailsIam::Config::Jwt.new @authentication = RailsIam::Config::Authentication.new # Host Application User Model, defaults to RailsIam::User # Used throughout RailsIam for authentication, authorization associations, and user lookup. @user_class = "RailsIam::User" # Current User Resolver, defaults to current_user # Method used by RailsIam to obtain the authenticated user when # the host application already manages authentication (e.g. Devise,) @current_user_method = :current_user # Audit performer method # Used to audit who created/assigned what permission # support symbol both symbol and proc i,e ->(user) { "#{user.id}:#{user.username}" } @audit_performer_method = :email end |
Instance Attribute Details
#audit_performer_method ⇒ Object
Returns the value of attribute audit_performer_method.
7 8 9 |
# File 'lib/rails_iam/configuration.rb', line 7 def audit_performer_method @audit_performer_method end |
#authentication ⇒ Object (readonly)
Returns the value of attribute authentication.
5 6 7 |
# File 'lib/rails_iam/configuration.rb', line 5 def authentication @authentication end |
#authorization ⇒ Object (readonly)
Returns the value of attribute authorization.
5 6 7 |
# File 'lib/rails_iam/configuration.rb', line 5 def @authorization end |
#current_user_method ⇒ Object
Returns the value of attribute current_user_method.
7 8 9 |
# File 'lib/rails_iam/configuration.rb', line 7 def current_user_method @current_user_method end |
#jwt ⇒ Object (readonly)
Returns the value of attribute jwt.
5 6 7 |
# File 'lib/rails_iam/configuration.rb', line 5 def jwt @jwt end |
#user_class ⇒ Object
Returns the value of attribute user_class.
7 8 9 |
# File 'lib/rails_iam/configuration.rb', line 7 def user_class @user_class end |