Class: Lhj::AppleJWTConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/lhj/helper/apple/apple_jwt_config.rb

Overview

Apple jwt Config

Constant Summary collapse

CONFIG_NAME =
'apple_jwt_config.yml'

Class Method Summary collapse

Class Method Details

.configObject



14
15
16
# File 'lib/lhj/helper/apple/apple_jwt_config.rb', line 14

def self.config
  @yaml ||= YAML.load_file(config_file)
end

.config_fileObject



10
11
12
# File 'lib/lhj/helper/apple/apple_jwt_config.rb', line 10

def self.config_file
  File.join(Lhj::Config.instance.home_dir, CONFIG_NAME)
end

.issuer_idObject



26
27
28
# File 'lib/lhj/helper/apple/apple_jwt_config.rb', line 26

def self.issuer_id
  config['issuer_id']
end

.key_idObject



30
31
32
# File 'lib/lhj/helper/apple/apple_jwt_config.rb', line 30

def self.key_id
  config['key_id']
end

.login_emailObject



18
19
20
# File 'lib/lhj/helper/apple/apple_jwt_config.rb', line 18

def self.
  config['login_email']
end

.login_passwordObject



22
23
24
# File 'lib/lhj/helper/apple/apple_jwt_config.rb', line 22

def self.
  config['login_password']
end

.private_keyObject



34
35
36
# File 'lib/lhj/helper/apple/apple_jwt_config.rb', line 34

def self.private_key
  config['private_key']
end

.private_key_fileObject



42
43
44
# File 'lib/lhj/helper/apple/apple_jwt_config.rb', line 42

def self.private_key_file
  File.expand_path(File.join(Lhj::Config.instance.home_dir, "AuthKey_#{key_id}.p8"))
end

.private_key_urlObject



38
39
40
# File 'lib/lhj/helper/apple/apple_jwt_config.rb', line 38

def self.private_key_url
  config['private_key_url']
end