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

Add read only token support #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

meikomeik
Copy link
Member

Add support for read only token that can only perform GET requests.
This is helpful for listing packages available for deployment

@meikomeik meikomeik requested a review from Woellchen January 21, 2021 13:53
@@ -255,7 +256,7 @@ func mainHandler(w http.ResponseWriter, r *http.Request, config *Config, lg *log
}
}

func validateToken(lg *log.Logger, config *Config, token string, repos []string) error {
func validateToken(lg *log.Logger, config *Config, token string, repos []string, method string) error {
Copy link

@Felixoid Felixoid Jan 21, 2021

Choose a reason for hiding this comment

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

Maybe, pass here Request r, and not its attributes like method and token?

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