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

minor improvements #11

Merged
merged 3 commits into from
Oct 29, 2024
Merged

minor improvements #11

merged 3 commits into from
Oct 29, 2024

Conversation

pkieltyka
Copy link
Member

No description provided.

@@ -26,7 +26,7 @@ func errHandler(r *http.Request, w http.ResponseWriter, err error) {
w.Write(respBody)
}

type KeyFunc func(*http.Request) string
type AccessKeyFunc func(*http.Request) string
Copy link
Member Author

Choose a reason for hiding this comment

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

lets use clear naming

@@ -10,21 +10,34 @@ import (
"github.com/0xsequence/authcontrol/proto"
)

// Options for the authcontrol middleware handlers Session and AccessControl.
Copy link
Member Author

@pkieltyka pkieltyka Oct 29, 2024

Choose a reason for hiding this comment

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

comments help make types clear.

middleware.go Outdated
ErrHandler ErrHandler
}

func (o *Options) ApplyDefaults() error {
Copy link
Member Author

Choose a reason for hiding this comment

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

less redundant code in other places..

@klaidliadon klaidliadon self-requested a review October 29, 2024 20:03
@klaidliadon klaidliadon merged commit 1b8b441 into master Oct 29, 2024
2 checks passed
@klaidliadon klaidliadon deleted the minor-improvements branch October 29, 2024 20:03
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.

2 participants