Module: RailsIam::ConfigLoader
- Extended by:
- Forwardable
- Included in:
- AuthController, Authentication::Authenticator, Authentication::JwtDecoder, Authentication::Login, Authorization::Authorizable, Authorization::Exceptions::MissingPermissionError, Authorization::Exceptions::MissingRoleError, RailsIamService
- Defined in:
- app/helpers/rails_iam/config_loader.rb
Instance Method Summary collapse
- #authentication_strategies ⇒ Object
- #authorization_rule_error ⇒ Object
- #cookie_options ⇒ Object
-
#jwt_algorithm ⇒ Object
Jwt configuration.
- #jwt_audience ⇒ Object
- #jwt_expiry ⇒ Object
- #jwt_issuer ⇒ Object
- #jwt_secret_key ⇒ Object
- #refresh_token_transport ⇒ Object
- #session_strategy ⇒ Object
- #user_class ⇒ Object
Instance Method Details
#authentication_strategies ⇒ Object
27 28 29 |
# File 'app/helpers/rails_iam/config_loader.rb', line 27 def authentication_strategies @authentication_strategies ||= Array(RailsIam.configuration.authentication.authentication_strategies).map(&:to_sym) end |
#authorization_rule_error ⇒ Object
45 46 47 48 |
# File 'app/helpers/rails_iam/config_loader.rb', line 45 def error = RailsIam.configuration.. "#{error.to_s.strip.ljust(1)} #{controller_name}##{action_name}" end |
#cookie_options ⇒ Object
35 36 37 |
# File 'app/helpers/rails_iam/config_loader.rb', line 35 def @cookie_options ||= RailsIam.configuration.authentication..except(:value, :expires) end |
#jwt_algorithm ⇒ Object
Jwt configuration
51 52 53 |
# File 'app/helpers/rails_iam/config_loader.rb', line 51 def jwt_algorithm RailsIam.configuration.jwt.algorithm end |
#jwt_audience ⇒ Object
63 64 65 |
# File 'app/helpers/rails_iam/config_loader.rb', line 63 def jwt_audience RailsIam.configuration.jwt.audience end |
#jwt_expiry ⇒ Object
55 56 57 |
# File 'app/helpers/rails_iam/config_loader.rb', line 55 def jwt_expiry RailsIam.configuration.jwt.jwt_expires_in end |
#jwt_issuer ⇒ Object
59 60 61 |
# File 'app/helpers/rails_iam/config_loader.rb', line 59 def jwt_issuer RailsIam.configuration.jwt.issuer end |
#jwt_secret_key ⇒ Object
67 68 69 |
# File 'app/helpers/rails_iam/config_loader.rb', line 67 def jwt_secret_key RailsIam.configuration.jwt.secret end |
#refresh_token_transport ⇒ Object
31 32 33 |
# File 'app/helpers/rails_iam/config_loader.rb', line 31 def refresh_token_transport @refresh_token_transport ||= RailsIam.configuration.authentication.refresh_token_transport.to_sym end |
#session_strategy ⇒ Object
23 24 25 |
# File 'app/helpers/rails_iam/config_loader.rb', line 23 def session_strategy @session_strategy ||= RailsIam.configuration.authentication.session_strategy&.to_sym end |
#user_class ⇒ Object
7 8 9 |
# File 'app/helpers/rails_iam/config_loader.rb', line 7 def user_class @user_class ||= RailsIam.configuration.user_class.constantize end |