Sunadde opened a new issue #345:
URL: https://github.com/apache/pulsar-client-go/issues/345


   Currently, when creating a client connecting to a service URL with auth 
enabled, you have to create an Authentication object and pass it.
   
   You may call `new authentication()` which internally creates a `Provider` 
but the `Provider` must fall in one of the limited options "tls", "token", 
"athenz", "oauth2" and the parameters are fixed in all these options. e.g. 
`NewAuthticationTLS()`expects the path to the key and cert, but in my case I 
already have the `tls.certificate` in memory and don't want to dump it to some 
temp files. (This is actually the main drive for this issue).
   
   Unfortunately, if you directly create an Authentication object and customize 
the auth process, it still doesn't work since there is an internal check trying 
to cast the authentication object to type `Provider` which is a private 
interface and not exposed to the public. It errors out if the casting fails.
   
   So I am asking if it can support a more customized way to create the 
authentication object or make the `Provider` interface public so that I can 
directly create an Authentication object and implements the Provider interface. 
Or since the main drive is to pass the `tls.certificate` instead of the paths 
to `NewAuthticationTLS()`, can you just provide this option for that method?
   
   Thanks!
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to