Skip to content

Session authentification & Ignore URLs via config file#8

Open
jjsaunier wants to merge 4 commits intoumpirsky:masterfrom
jjsaunier:features
Open

Session authentification & Ignore URLs via config file#8
jjsaunier wants to merge 4 commits intoumpirsky:masterfrom
jjsaunier:features

Conversation

@jjsaunier
Copy link

./bin/centipede run http://mywebsite.com --auth-method=session --session-name=SESSNAME --session-id=peigs2pqfjkdr4ms6k3epaamr2 --ignore-url=/app_dev.php/user/logout
  • Ignore url (one or many)
  • Auth user via authenticator, by default we provide SessionAuthenticator, --session-name is PHPSESSID by default. And you can add your own. Auth is totally optional.
  • Fix depth, was not given to centipede-crawler before.

PR on centipede crawler is coming.

@umpirsky
Copy link
Owner

I would like to support configurable list of ignore urls via config, see #2.

Standard auth methods are also in planning, but I would like to keep crawler interface simple, including constructor.

Copy link
Owner

Choose a reason for hiding this comment

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

No need for new line there.

@jjsaunier
Copy link
Author

Now you can do it

./bin/centipede run http://github.com -c /home/user/[..]/centipede.yml

with :

ignore:
    - '/blog'
    - '/explore'

for example

@jjsaunier jjsaunier changed the title new features Session authentification & Ignore URLs via config file Dec 17, 2014
@umpirsky
Copy link
Owner

Cool, I will revisit this PR and do it in separate PR to split config implementation and auth.

I also want config to be in the root of target project like for Behat and PHPSpec.

@gnutix
Copy link
Contributor

gnutix commented Feb 20, 2015

Any progress on this ? I just got a legacy project to manage that needs authentication and I would love to use centipede to ensure each page is accessible upon migrations/changes.

@umpirsky
Copy link
Owner

@gnutix No, sorry. I didn't have chance to work on it lately.

You can fork it and adopt to your needs, then post link here and we will see what can be reused/merged.

Copy link

@bhavin-nakrani bhavin-nakrani left a comment

Choose a reason for hiding this comment

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

I want to review about coding standard and some minor changes if needed.

{
$config = array();

if (null !== $configFilePath) {

Choose a reason for hiding this comment

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

You can reduce line and remove nested if like if (null !== $configFilePath & !file_exists($configFilePath)) {

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