Skip to content
Snippets Groups Projects
Commit ead2472b authored by Andrew Hoffmann's avatar Andrew Hoffmann
Browse files

Updated the changePassword documentation to indicate that it does not

check for complexity requirements. Added a check for the 400 return
value, even though it is not documented in the WSDL. (I encountered it
in the past.)
parent 1e0d1a6c
No related branches found
No related tags found
No related merge requests found
......@@ -41,10 +41,14 @@ interface RpcNetidClient {
function credentialCheck ( $uid, \DateTime $birthdate, $wiscard = null );
/**
* Checks that the password meets require criteria and then changes password if it meets criteria
* Changes the password for a given NetID
*
* <p><b>WARNING READ THIS IMPORTANT DO NOT SKIP:</b> This method DOES NOT check if the password
* meets complexity requirements. You MUST check the complexity using {@link RpcNetidClient::passwordChoicePolicyCheck}</p>
*
* @param string $uid the uid of the user to search for (typically the NetID)
* @param string $password the password to be checked for policy adherence and replace current password
* @return bool True if password was changed successfully, false if password did not meet password criteria
* @return bool true if password was changed successfully, false otherwise
* @throws edu\wisc\doit\RpcNetidClientSoapException if unexpected response code from SOAP service
*/
function changePassword ( $uid, $password );
......
......@@ -208,12 +208,12 @@ class RpcNetidClientSoap implements RpcNetidClient {
return true;
}
if( $result->result === 401 ){
if( $result->result === 400 or $result->result === 401 ){
return false;
}
throw new RpcNetidClientSoapException("Unexpected status code: {$result->result}",
RpcNetidClientSoapException::UNEXPECTED_STATUS_CODE );
RpcNetidClientSoapException::UNEXPECTED_STATUS_CODE );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment