-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClientManager for token-based clients? #98
Comments
The reason I added a PR for So it seems to me one could use a single I believe this would be possible today in user code with something like this: mu.Lock()
client.Token = token
client.PushWithContext(...)
mu.Unlock() |
@dwieeb so, we don't need client manager at all for token clients? |
@dwieeb you're wrong, we've got an issue with JWT tokens - Apple do not allow to reuse same connection for different tokens. I've made PR to add token support for |
Apple documentation clearly states:
In our case, we are building a system that sends Push Notifications to different apps from different developer accounts, using JWT tokens. |
@lakim we've used those changes in production since PR was created, but I don't have any reports about issues |
ClientManager
is a great class, it would be nice to have a version of this class (TokenClientManager
?) which works for JWT/Auth token based clients. It looks like this could be done without too much effort (make theGet
method take a*token.Token
, changecacheKey
to be based on*token.Token
instead oftls.Certificate
, makeFactory
take a*token.Token
instead of atls.Certificate
).The text was updated successfully, but these errors were encountered: