apereo / apereo/phpCAS

Move all parameter validation out of the phpCAS class or make the phpCAS testable

Open
#7 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
PHP
Stars
798
Forks
419
PR merge metrics
No merged PRs in 30d

Description

Migrated from PHPCAS-127

Description

The phpCAS class should only validate that the client exists all other input validation and sequence validation should be done in the CAS_Client where it is testable.

Alternatively, the phpCAS class could be made testable by allowing resetting of its variables.

Joachim Fritschi added a comment - 06/Sep/11 1:52 PM - edited

Ok sounds like a plan. But if it's possible don't move the validation code directly into the CAS_Cclient class. I would really like to start stripping this class down. 3000 lines is just a bit to much for my taste.
Maybe we can put this in some external Validator class?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the phpCAS class and CAS_Client to map which parameter and sequence validation each currently performs. Compare the proposed approaches—moving validation into CAS_Client or introducing an external Validator class—and determine how phpCAS could remain limited to checking that the client exists. Done means the validation responsibilities are separated and the relevant behavior remains testable.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.