Basic HTTP Authentication #39

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
6 participants
@CEikermann
Contributor

CEikermann commented Dec 31, 2011

Here is a implementation for basic http authentication

@CEikermann

This comment has been minimized.

Show comment Hide comment
@CEikermann

CEikermann Jan 9, 2012

Contributor

Any update for this pull request?

Contributor

CEikermann commented Jan 9, 2012

Any update for this pull request?

@@ -9,11 +9,18 @@ class Request extends AbstractMessage implements RequestInterface
const METHOD_POST = 'POST';
const METHOD_PUT = 'PUT';
const METHOD_DELETE = 'DELETE';
-
+

This comment has been minimized.

Show comment Hide comment
@stof

stof Jan 9, 2012

Contributor

please remove all trailing whitespaces you added

@stof

stof Jan 9, 2012

Contributor

please remove all trailing whitespaces you added

This comment has been minimized.

Show comment Hide comment
@missinglink

missinglink Jan 28, 2012

Tabs and spaces: sed -i 's/[ \t]$//' */.php
Trailing whitespace: perl -i.bak -pe 'if (defined $x && /\S/) { print $x; $x = ""; } $x .= "\n" x chomp; s/\s
?$//; 1 while s/^(\t_) /$1\t/; if (eof) { print "\n"; $x = ""; }' _/.php

ref: http://stackoverflow.com/questions/5011630/how-to-clean-a-codebase-trailing-whitespace-new-lines-etc

@missinglink

missinglink Jan 28, 2012

Tabs and spaces: sed -i 's/[ \t]$//' */.php
Trailing whitespace: perl -i.bak -pe 'if (defined $x && /\S/) { print $x; $x = ""; } $x .= "\n" x chomp; s/\s
?$//; 1 while s/^(\t_) /$1\t/; if (eof) { print "\n"; $x = ""; }' _/.php

ref: http://stackoverflow.com/questions/5011630/how-to-clean-a-codebase-trailing-whitespace-new-lines-etc

@stof

This comment has been minimized.

Show comment Hide comment
@stof

stof Jan 9, 2012

Contributor

@kriswallsmith do you have time to review it ?

Contributor

stof commented Jan 9, 2012

@kriswallsmith do you have time to review it ?

@davidwinter

This comment has been minimized.

Show comment Hide comment
@davidwinter

davidwinter Jan 26, 2012

+1

+1

@stof

This comment has been minimized.

Show comment Hide comment
@stof

stof Jan 26, 2012

Contributor
Contributor

stof commented Jan 26, 2012

@elnur

This comment has been minimized.

Show comment Hide comment
@elnur

elnur Jan 28, 2012

I need this. :P

elnur commented Jan 28, 2012

I need this. :P

@kriswallsmith

This comment has been minimized.

Show comment Hide comment
@kriswallsmith

kriswallsmith Jan 28, 2012

Owner

You can do this easily enough by adding an Authorization header:

$request->addHeader('Authorization: Basic '.base64_encode($username.':'.$password));

That is good enough for the core request class. Any sort of convenience layer for authentication should go on Browser.

Owner

kriswallsmith commented Jan 28, 2012

You can do this easily enough by adding an Authorization header:

$request->addHeader('Authorization: Basic '.base64_encode($username.':'.$password));

That is good enough for the core request class. Any sort of convenience layer for authentication should go on Browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment