Module: CF::Auth
- Defined in:
- lib/cf/auth.rb
Class Method Summary collapse
Class Method Details
.bearer_token_headers(token) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/cf/auth.rb', line 5 def self.bearer_token_headers(token) { "Authorization" => "Bearer #{token}", "User-Agent" => "CF Ruby SDK #{CF::VERSION}" } end |
.validate_token!(token) ⇒ Object
12 13 14 |
# File 'lib/cf/auth.rb', line 12 def self.validate_token!(token) raise CF::AuthenticationError, "API token is required" if token.nil? || token.empty? end |