CupertinoJWT icon indicating copy to clipboard operation
CupertinoJWT copied to clipboard

Linux support

Open fotiDim opened this issue 6 years ago • 3 comments

I need to create MusicKit tokens on Linux (through Vapor). Is there any chance this library supports Linux?

fotiDim avatar Aug 29 '18 09:08 fotiDim

Thanks for asking.

CupertinoJWT is based on Apple's Security and CommonCrypto frameworks and is intentionally only supports Apple platforms. Why, because I don't use Swift on Linux, and there are solutions for Linux.

For example, although the Vapor community removed ECDSA JWT support in the earlier version, I believe they are working on adding ECDSA support back on the newest version.

I'll leave this issue opened since this question might be frequently asked.

ethanhuang13 avatar Aug 29 '18 09:08 ethanhuang13

@fotiDim If you still need es256 on Linux, Swift-JWT has now has cross platform support for signing and verifying.

Andrew-Lees11 avatar May 29 '19 12:05 Andrew-Lees11

I'll bring this back up again, Kitura is dead so Swift-JWT will be as well.

Apple has released SwiftCrypto which is an open source version of CryptoKit which also supports Linux. Could that be the missing piece that could bring CupertinoJWT to the server side?

I have tried every JWT package I can find and the only one that I can get to work is this one. The others are so overly complex to use they are useless.

My last resort is to install a Python library and have Swift call out for token generation.

OurBigAdventure avatar Jun 27 '22 00:06 OurBigAdventure