Skip to content

Commit

Permalink
Code is an attribute, not an element
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Feb 14, 2024
1 parent c175dee commit e2353cc
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Cas/Protocol/Cas20.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
use SimpleSAML\CAS\XML\cas\AuthenticationDate;
use SimpleSAML\CAS\XML\cas\AuthenticationFailure;
use SimpleSAML\CAS\XML\cas\AuthenticationSuccess;
use SimpleSAML\CAS\XML\cas\Code;
use SimpleSAML\CAS\XML\cas\IsFromNewLogin;
use SimpleSAML\CAS\XML\cas\LongTermAuthenticationRequestTokenUsed;
use SimpleSAML\CAS\XML\cas\ProxyFailure;
Expand Down Expand Up @@ -170,8 +169,7 @@ public function getValidateSuccessResponse(string $username): AuthenticationSucc
*/
public function getValidateFailureResponse(string $errorCode, string $explanation): ServiceResponse
{
$code = new Code($errorCode);
$authenticationFailure = new AuthenticationFailure($explanation, $code);
$authenticationFailure = new AuthenticationFailure($explanation, $errorCode);
$serviceResponse = new ServiceResponse($authenticationFailure);

return $serviceResponse;
Expand Down Expand Up @@ -199,8 +197,7 @@ public function getProxySuccessResponse(string $proxyTicketId): ServiceResponse
*/
public function getProxyFailureResponse(string $errorCode, string $explanation): ServiceResponse
{
$code = new Code($errorCode);
$proxyFailure = new ProxyFailure($explanation, $code);
$proxyFailure = new ProxyFailure($explanation, $errorCode);
$serviceResponse = new ServiceResponse($proxyFailure);

return $serviceResponse;
Expand Down

0 comments on commit e2353cc

Please sign in to comment.