View | Details | Raw Unified | Return to bug 35204
Collapse All | Expand All

(-)a/Koha/REST/V1/Auth/Password.pm (-3 / +3 lines)
Lines 72-81 sub validate { Link Here
72
72
73
    return try {
73
    return try {
74
        my ( $status, $THE_cardnumber, $THE_userid ) = C4::Auth::checkpw( $identifier, $password );
74
        my ( $status, $THE_cardnumber, $THE_userid ) = C4::Auth::checkpw( $identifier, $password );
75
        unless ($status) {
75
        unless ($status && $status > 0) {
76
            my $error_response = $status == -2 ? 'Password expired' : 'Validation failed';
76
            return $c->render(
77
            return $c->render(
77
                status  => 400,
78
                status  => 400,
78
                openapi => { error => "Validation failed" }
79
                openapi => { error => $error_response }
79
            );
80
            );
80
        }
81
        }
81
82
82
- 

Return to bug 35204