-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
expose the nonce to custom authentication #2699
Conversation
This is a companion to #2696 that ensure custom auth methods can actually get the nonce, I assumed it was on ClientOpts but not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but we have a test called TestCustomClientAuthentication
that you could extend/copy form to actually verify that a nonce is specified?
8e790c2
to
59ad6f2
Compare
OK, added a bit to that test |
server/server_test.go
Outdated
@@ -629,6 +638,14 @@ func TestCustomClientAuthentication(t *testing.T) { | |||
if _, err := nats.Connect(addr, nats.UserInfo("invalid", "")); err == nil { | |||
t.Fatal("Expected client to fail to connect") | |||
} | |||
|
|||
s.opts.AlwaysEnableNonce = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am getting races when running your test, so need to revisit that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I was less lazy now, think it probably fixed now
59ad6f2
to
782fd2b
Compare
Signed-off-by: R.I.Pienaar <[email protected]>
782fd2b
to
ffee747
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: R.I.Pienaar [email protected]
/cc @nats-io/core