Class: Otto::Security::Authentication::Strategies::NoAuthStrategy
- Inherits:
-
AuthStrategy
- Object
- AuthStrategy
- Otto::Security::Authentication::Strategies::NoAuthStrategy
- Defined in:
- lib/otto/security/authentication/strategies/noauth_strategy.rb
Overview
Public access strategy - always allows access
Instance Method Summary collapse
Instance Method Details
#authenticate(env, _requirement) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/otto/security/authentication/strategies/noauth_strategy.rb', line 14 def authenticate(env, _requirement) # Note: env['REMOTE_ADDR'] is masked by IPPrivacyMiddleware by default = { ip: env['REMOTE_ADDR'] } [:country] = env['otto.geo_country'] if env['otto.geo_country'] Otto::Security::Authentication::StrategyResult.anonymous(metadata: ) end |