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

Validate access token before authentication #187

Merged
merged 3 commits into from
May 10, 2024
Merged

Conversation

wanliqun
Copy link
Contributor

@wanliqun wanliqun commented May 10, 2024

This change is Reviewable

@wanliqun wanliqun requested a review from boqiu May 10, 2024 06:50
Copy link
Contributor

@boqiu boqiu left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @wanliqun)


util/rpc/handlers/vip.go line 43 at r1 (raw file):

// ValidateAccessToken validates if an access token from context
// is at least minimum length and only contains alphanumeric chars.
func ValidateAccessToken(ctx context.Context) bool {

Generally, IsValid returns bool value, and ValidateXxx returns error.

Copy link
Contributor Author

@wanliqun wanliqun left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @boqiu)


util/rpc/handlers/vip.go line 43 at r1 (raw file):

Previously, boqiu (Bo QIU) wrote…

Generally, IsValid returns bool value, and ValidateXxx returns error.

Done.

Copy link
Contributor

@boqiu boqiu left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @wanliqun)

@wanliqun wanliqun merged commit 9b08525 into main May 10, 2024
2 checks passed
@wanliqun wanliqun deleted the validate-access-token branch May 10, 2024 10:20
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