Class: RosettAi::Licensing::LicenseValidator
- Inherits:
-
Object
- Object
- RosettAi::Licensing::LicenseValidator
- Defined in:
- lib/rosett_ai/licensing/license_validator.rb
Overview
Orchestrates the full license validation flow: load from store -> decode -> verify signature -> check expiry.
Returns a structured result hash. Never raises for expected states (missing license, expired subscription).
Instance Method Summary collapse
-
#validate ⇒ Hash{Symbol => Object}
Runs the full license validation flow.
Instance Method Details
#validate ⇒ Hash{Symbol => Object}
Runs the full license validation flow.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rosett_ai/licensing/license_validator.rb', line 17 def validate store = LicenseStore.new return community_result unless store.exists? raw_key = store.load return community_result if raw_key.nil? || raw_key.empty? validate_key(raw_key) rescue RosettAi::LicenseError => e error_result(e.) end |