File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3+ # NOTE: This code does not connect directly to Apple, a bridge lambda is used in between to handle communication and API calls.
4+ # This is not an official Apple API client, and to use Apple API you will need to have your own agreement with Apple to access their APIs.
5+
36module Apple
47 class Api
58 ERROR_RETRIES = 3
@@ -30,6 +33,10 @@ def self.api_base
3033 ENV [ "APPLE_PODCASTS_CONNECT_API_URL" ]
3134 end
3235
36+ def self . api_aud_name
37+ ENV [ "APPLE_PODCASTS_CONNECT_AUD_NAME" ]
38+ end
39+
3340 def self . from_key ( apple_key )
3441 new ( provider_id : apple_key . provider_id ,
3542 key_id : apple_key . key_id ,
@@ -72,7 +79,7 @@ def jwt_payload
7279
7380 { iss : provider_id ,
7481 exp : now . to_i + ( 60 * 15 ) ,
75- aud : "podcastsconnect-v1" }
82+ aud : self . class . api_aud_name }
7683 end
7784
7885 def jwt_headers
You can’t perform that action at this time.
0 commit comments