Class: ServiceHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/jpush/util/service_helper.rb

Constant Summary collapse

@@BASIC_PREFIX =
'Basic'

Class Method Summary collapse

Class Method Details

.getAuthorizationBase64(appKey, masterSecret) ⇒ Object


5
6
7
8
9
10
# File 'lib/jpush/util/service_helper.rb', line 5

def self.getAuthorizationBase64(appKey, masterSecret)
   encodeKey = appKey + ":" + masterSecret
   value = @@BASIC_PREFIX + " " + Base64.encode64(encodeKey)
   value.gsub!("\n", '')
   return value
end