oauth2-server-php icon indicating copy to clipboard operation
oauth2-server-php copied to clipboard

Add more statusTexts

Open pappu687 opened this issue 7 years ago • 2 comments

Would be nice to update the Response Class with some of the latest statusTexts like these from here

    const HTTP_I_AM_A_TEAPOT = 418;                                               // RFC2324
    const HTTP_MISDIRECTED_REQUEST = 421;                                         // RFC7540
    const HTTP_UNPROCESSABLE_ENTITY = 422;                                        // RFC4918
    const HTTP_LOCKED = 423;                                                      // RFC4918
    const HTTP_FAILED_DEPENDENCY = 424;                                           // RFC4918
    const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425;   // RFC2817
    const HTTP_UPGRADE_REQUIRED = 426;                                            // RFC2817
    const HTTP_PRECONDITION_REQUIRED = 428;                                       // RFC6585
    const HTTP_TOO_MANY_REQUESTS = 429;                                           // RFC6585
    const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;                             // RFC6585
    const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451;

pappu687 avatar May 06 '18 10:05 pappu687

Do you have an example related to OAuth2 where you need the extra status texts?

reb3r avatar May 08 '18 18:05 reb3r

Apigility Framework uses 422 for validation errors as standard. I needed to customize usercredentials validation and throw 422 to maintain consistencies in the app but couldn't do it the normal way because they didn't exist in the Response class.

pappu687 avatar May 09 '18 01:05 pappu687