Module: EndPointBlank::Commands::BearerGenerateMethods::ClassMethods

Defined in:
lib/end_point_blank/commands/bearer_generate.rb

Instance Method Summary collapse

Instance Method Details

#auth_headerObject



15
16
17
# File 'lib/end_point_blank/commands/bearer_generate.rb', line 15

def auth_header
  "Basic " + generate
end

#configurationObject



7
8
9
# File 'lib/end_point_blank/commands/bearer_generate.rb', line 7

def configuration
  EndPointBlank::Configuration.instance
end

#generateObject



11
12
13
# File 'lib/end_point_blank/commands/bearer_generate.rb', line 11

def generate()
  Base64.encode64(configuration.client_id + ":" + configuration.client_secret).gsub("\n", "")
end