Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
x/crypto/ssh: allow returning arbitrary data from the server authorization callbacks #21689
I'm writing a SSH server that will check against a database to authorize the user's public key and then it will allow the user various abilities based on their permissions as listed in the database. The permissions are returned with the user. They are a integer type.
The problem is that I cannot pass those permissions from the public key callback straight to my implementation code. Instead, right now, I'm encoding the permissions as a string, putting them into the
I propose we add a new field to the
I understand your problem, but marshalling an int to string seems straightforward enough, so your case by itself doesn't warrant an API change.
I'd love to see some more reports of what people want to pass around.
(Maybe we should this be fold this together with a context-ization of the SSH package?)