Skip to content

add support for http basic auth #1706

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

Merged
merged 2 commits into from
May 19, 2016

Conversation

hmoqhim
Copy link
Contributor

@hmoqhim hmoqhim commented May 5, 2016

reference #1059

This is to add support for http basic authentication on parser-server

function httpAuth(req) {
var appId, masterKey, javascriptKey;
var credentialsRegExp = /^ *(?:[Bb][Aa][Ss][Ii][Cc]) +([A-Za-z0-9\-\._~\+\/]+=*) *$/
var appIdKeyRegExp = /^([^ :]*):([Jj][Aa][Vv][Aa][Ss][Cc][Rr][Ii][Pp][Tt][-][Kk][Ee][Yy]=)?(.*)/
Copy link
Contributor

Choose a reason for hiding this comment

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

could we use case insensitive search to simplify the regexp?

@ghost
Copy link

ghost commented May 19, 2016

@hmoqhim updated the pull request.

@drew-gross
Copy link
Contributor

Looks good to me! Just making sure tests pass, then I will merge.

@drew-gross drew-gross merged commit 03108e6 into parse-community:master May 19, 2016
@hmoqhim hmoqhim deleted the http-basic-auth branch May 19, 2016 04:40
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.

4 participants