You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a server app based on SwiftNIO (i.e. not Vapor) and I was wondering if I should create one instance of JWTSigners per app, per EventLoop or per each request handler?
This is something worth mentioning in the documentation btw - unless I missed it somehow, of course.
Edit: do I understand it correctly that if I create a JWTSigner instead of JWTSigners at program startup then any calls to sign() or verify() can be considered thread-safe?
The text was updated successfully, but these errors were encountered:
JWTSigners is not thread safe due to the lack of locks in the dictionary. JWTSigner should be thread safe, I don't think there are any issues with BoringSSL across threads
I'm building a server app based on SwiftNIO (i.e. not Vapor) and I was wondering if I should create one instance of JWTSigners per app, per EventLoop or per each request handler?
This is something worth mentioning in the documentation btw - unless I missed it somehow, of course.
Edit: do I understand it correctly that if I create a
JWTSigner
instead ofJWTSigners
at program startup then any calls tosign()
orverify()
can be considered thread-safe?The text was updated successfully, but these errors were encountered: