Open AEDWIP opened 6 years ago
Hi, yeah my library does not support token generation using ES256 algorithm and key pair signature.
I'm working to add this feature as soon as I can.
Thanks Nathan
Andy
From: Nathan Ducrey notifications@github.com Reply-To: ducreyna/objective-c-jwt-simple <reply+00725a2fbcadd025b45224053a5f703c3581a951e1fe45dc92cf00000001178bab959 2a169ce14991e13@reply.github.com> Date: Wednesday, August 15, 2018 at 1:51 AM To: ducreyna/objective-c-jwt-simple objective-c-jwt-simple@noreply.github.com Cc: Andrew Davidson Andy@SantaCruzIntegration.com, Author author@noreply.github.com Subject: Re: [ducreyna/objective-c-jwt-simple] can not connect to api.music.apple.com any plans to support ES256 (#4)
Hi, yeah my library does not support token generation using ES256 algorithm and key pair signature.
I'm working to add this feature as soon as I can.
You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ducreyna/objective-c-jwt-simple/issues/4#issuecomment-4131 35181 , or mute the thread https://github.com/notifications/unsubscribe-auth/AHJaL2ZxEl8LfC5QQF09FmLs6Hr oWKKoks5uQ-EVgaJpZM4Vlo9P . {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb" ,"name":"GitHub"},"entity":{"external_key":"github/ducreyna/objective-c-jwt-si mple","title":"ducreyna/objective-c-jwt-simple","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/messa ge_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/ email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/ducreyna/objective-c-jwt-simple"}},"updates" :{"snippets":[{"icon":"PERSON","message":"@ducreyna in #4: Hi, yeah my library does not support token generation using ES256 algorithm and key pair signature.\r\n\r\nI'm working to add this feature as soon as I can."}],"action":{"name":"View Issue","url":"https://github.com/ducreyna/objective-c-jwt-simple/issues/4#issu ecomment-413135181"}}}[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/ducreyna/objective-c-jwt-simple/issues/4#issuecomment-4131 35181", "url": "https://github.com/ducreyna/objective-c-jwt-simple/issues/4#issuecomment-4131 35181", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [ducreyna/objective-c-jwt-simple] can not connect to api.music.apple.com any plans to support ES256 (#4)", "sections": [ { "text": "", "activityTitle": "Nathan Ducrey", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@ducreyna", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"ducreyna/objective-c-jwt-simple\",\n\"issueId\": 4,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"ducreyna/objective-c-jwt-simple\",\n\"issueId\": 4\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/ducreyna/objective-c-jwt-simple/issues/4#issuecomment-4131 35181" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 362188623\n}" } ], "themeColor": "26292E" } ]
I am trying to connect to api.music.apple.com . The JWT token needs to be ES256. I tried HS256 how ever I always get back a 401 status. If I used the token generated by a python script my networking code works. So I suspect either apple does not support HS255 or I am not passing my key to encode correctly
In my python script I would pass something like
in my objc code my key would be
Kind regards
Andy
p.s. My "plan b" is to generate tokens and place them on my server. I not crazy about this approach. I do not think its particularly secure.