Skip to content
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

adds the notion of a connection deadline to User #3580

Merged
merged 1 commit into from Oct 28, 2022

Conversation

ripienaar
Copy link
Contributor

This will be used mainly by CustomClientAuthentication implementations to indicate that the user connection should be disconnected at some point in future - like when a certificate or token expires

Signed-off-by: R.I.Pienaar rip@devco.net

/cc @nats-io/core

This will be used mainly by CustomClientAuthentication implementations
to indicate that the user connection should be disconnected at some
point in future - like when a certificate or token expires

Signed-off-by: R.I.Pienaar <rip@devco.net>
@ripienaar
Copy link
Contributor Author

@kozlovic draft PR to discuss what we spoke about, seemed easier than anticipated so I think I must be missing something, let me know your thoughts please?

@@ -83,6 +84,14 @@ func (u *User) clone() *User {
clone := &User{}
*clone = *u
clone.Permissions = u.Permissions.clone()

if len(u.AllowedConnectionTypes) > 0 {
Copy link
Contributor Author

@ripienaar ripienaar Oct 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont know if this is needed, just noticed it might not be cloning this map so added it, not related to the PR really

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is good to do.

Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good. Make sure it covers all the cases you want and then you could make it a formal PR against dev branch.

@@ -83,6 +84,14 @@ func (u *User) clone() *User {
clone := &User{}
*clone = *u
clone.Permissions = u.Permissions.clone()

if len(u.AllowedConnectionTypes) > 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is good to do.

@ripienaar
Copy link
Contributor Author

OK, will finish it tomorrow thanks

@ripienaar ripienaar marked this pull request as ready for review October 27, 2022 17:12
@ripienaar
Copy link
Contributor Author

Actually it does what I want right now, so I am happy to merge unless you have anythign else @kozlovic

@ripienaar ripienaar merged commit 021e394 into nats-io:dev Oct 28, 2022
@ripienaar ripienaar deleted the user_conn_deadline branch October 28, 2022 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants