Class: OpenC3::OpenC3Authentication
- Defined in:
- lib/openc3/utilities/authentication.rb
Overview
OpenC3 base / open source authentication code
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize ⇒ OpenC3Authentication
constructor
A new instance of OpenC3Authentication.
-
#token ⇒ Object
Load the token from the environment.
Constructor Details
#initialize ⇒ OpenC3Authentication
Returns a new instance of OpenC3Authentication.
34 35 36 37 38 39 |
# File 'lib/openc3/utilities/authentication.rb', line 34 def initialize() @token = ENV['OPENC3_API_PASSWORD'] if @token.nil? raise OpenC3AuthenticationError, "Authentication requires environment variable OPENC3_API_PASSWORD" end end |
Instance Method Details
#token ⇒ Object
Load the token from the environment
42 43 44 |
# File 'lib/openc3/utilities/authentication.rb', line 42 def token() @token end |